1 Reply Latest reply on Sep 3, 2008 1:47 PM by Heiko Rupp

    email alert gives exception

    jsingh jsingh Newbie

      Hello, I have been trying to set up an alert with some conditions, and have defined an email address this alert should be sent to on meeting the condition.

      My condition is to send the alert if there are more than 40 active threads. I see from the monitor that there are 50 active threads at any given time.

      But the JON app fails when sending emails. From the logs I see the following exception at regular intervals. I have tried with my company email id and also a general id like gmail. Have I missed defining something somewhere?
      Thanks.
      Exception is:
      12:24:24,030 ERROR [AlertManagerBean] One or more notifications for Alert[id=1001102] failed: Exception reading response
      12:25:22,109 ERROR [EmailManagerBean] Failed to send email [ [ALERT] priority of [!! - Medium] for alert [test alert] on resource [MyMachine JBossAS 4.2.2.GA default (0.0.0.0:2999)]] to recipient [jsingh2004@gmail.com]
      javax.mail.MessagingException: Exception reading response;
      nested exception is:
      java.net.SocketException: Connection reset
      at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
      at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
      at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
      at javax.mail.Service.connect(Service.java:275)
      at javax.mail.Service.connect(Service.java:156)
      at javax.mail.Service.connect(Service.java:105)
      at javax.mail.Transport.send0(Transport.java:168)
      at javax.mail.Transport.send(Transport.java:120)
      at org.rhq.enterprise.server.core.EmailManagerBean.sendEmail(EmailManagerBean.java:103)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:153)
      at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
      at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184)
      at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)
      at $Proxy200.sendEmail(Unknown Source)
      at org.rhq.enterprise.server.alert.AlertManagerBean.sendAlertNotificationEmails(AlertManagerBean.java:571)
      at org.rhq.enterprise.server.alert.AlertManagerBean.sendAlertNotifications(AlertManagerBean.java:540)
      at org.rhq.enterprise.server.alert.AlertManagerBean.fireAlert(AlertManagerBean.java:468)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:153)