Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
6 replies Latest Post - ‏2013-01-17T07:46:28Z by Mahdad
Mahdad
Mahdad
59 Posts
ACCEPTED ANSWER

Pinned topic Some emails sporadically not sent

‏2013-01-15T23:32:05Z |
Some emails are not sent from WC to the customer. We use transacted send, and the rows are in msgstore table. Some are sent properly, but some get retried until retries becomes 0 and the message is abandoned by WC. For those which fail and get abandoned, there is nothing in SMTP logs, so SMTP server doesn't receive those.

There are errors in logs for those failed ones. I don't have them now but can attach later.
This only happens on PROD and cannot be reproduced on any other environments.

There are 3 WC instances on PROD and only one SMTP server.
I suspect it could be a synchronization issue when more than one instance of WC tries to write into SMTP server socket/port and fails.
There is no specific time, pattern, order items, member, or anything, seems totally sporadic.

Any idea?
Thanks.

Mahdad
Updated on 2013-01-17T07:46:28Z at 2013-01-17T07:46:28Z by Mahdad
  • Raj.S
    Raj.S
    519 Posts
    ACCEPTED ANSWER

    Re: Some emails sporadically not sent

    ‏2013-01-16T09:31:06Z  in response to Mahdad
    Are all the three WCS instances pointing to a common database ? Is your SendMessageCmd scheduled on all these 3 instances ? If so, why ?

    Please attach the logs, that would help better understand the issue.

    Regards,
    Raj
    • Mahdad
      Mahdad
      59 Posts
      ACCEPTED ANSWER

      Re: Some emails sporadically not sent

      ‏2013-01-16T21:01:58Z  in response to Raj.S
      Thanks Raj.

      3 WC instances and one DB, and one SMTP server. I suspect it's a synchronization issue. Attached is logs.

      1/16/13 12:58:00:060 MST 00000138 jcaemail E com.ibm.commerce.messaging.adapters.jcaemail.JCAEmailManagedConnection destroy() The following exception has occurred: Can't send command to SMTP host.

      1/16/13 12:58:00:083 MST 00000138 jcaemail E com.ibm.commerce.messaging.adapters.jcaemail.JCAEmailInteraction Exception occurred when the messaging system sent the message: Can't send command to SMTP host

      1/16/13 12:58:00:085 MST 00000138 CommerceSrvr E JMSMessageBean sendImmediate CMN9907E: A resource exception occurred during processing: "{0}". javax.resource.spi.CommException: Exception occurred when the me

      ssaging system sent the message: Can't send command to SMTP host

      at com.ibm.commerce.messaging.adapters.jcaemail.JCAEmailInteraction.execute(JCAEmailInteraction.java:439)

      at com.ibm.commerce.messaging.objects.JMSMessageBean.sendImmediate(JMSMessageBean.java:328)

      at com.ibm.commerce.messaging.objects.EJSRemoteStatelessJMSMessage_d6d5624d.sendImmediate(EJSRemoteStatelessJMSMessage_d6d5624d.java:71)

      at com.ibm.commerce.messaging.objects._JMSMessage_Stub.sendImmediate(_JMSMessage_Stub.java:283)

      at com.ibm.commerce.messaging.objects.JMSMessageAccessBean.sendImmediate(JMSMessageAccessBean.java:137)

      at com.ibm.commerce.messaging.outboundservice.Messaging.sendImmediate(Messaging.java:4177)

      at com.ibm.commerce.messaging.outboundservice.SendTransactedMsgCmdImpl.assembleMsg(SendTransactedMsgCmdImpl.java:489)

      at com.ibm.commerce.messaging.outboundservice.SendTransactedMsgCmdImpl.performExecute(SendTransactedMsgCmdImpl.java:700)

      at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)

      at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)

      at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:166)

      at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:172)

      at com.ibm.commerce.component.BaseComponentImpl.executeCommand(BaseComponentImpl.java:190)

      at com.ibm.commerce.component.WebAdapterComponentImpl.executeCommand(WebAdapterComponentImpl.java:46)

      at com.ibm.commerce.component.objimpl.WebAdapterServiceBeanBase.executeCommand(WebAdapterServiceBeanBase.java:58)

      at com.ibm.commerce.component.objects.EJSLocalStatelessWebAdapterService_ce749a4a.executeCommand(EJSLocalStatelessWebAdapterService_ce749a4a.java:31)

      at com.ibm.commerce.component.objects.WebAdapterServiceAccessBean.executeCommand(WebAdapterServiceAccessBean.java:160)

      at com.ibm.commerce.scheduler.SchedulerJob.process(SchedulerJob.java:505)

      at com.ibm.commerce.scheduler.SchedulerSecurityPriviledgedAction.run(SchedulerSecurityPriviledgedAction.java:59)

      at com.ibm.commerce.scheduler.SchedulerJob.run(SchedulerJob.java:1035)

      at com.ibm.commerce.threadmanagement.internal.BaseWork.run(BaseWork.java:139)

      at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:264)

      at java.security.AccessController.doPrivileged(AccessController.java:202)

      at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1137)

      at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:199)

      at com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:188)

      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)

      Caused by: javax.mail.MessagingException: Can't send command to SMTP host;

      nested exception is:

      java.net.SocketException: Broken pipe

      at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1420)

      at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1408)

      at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1371)

      at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)

      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)

      at com.ibm.commerce.messaging.adapters.jcaemail.JCAEmailInteraction.execute(JCAEmailInteraction.java:346)

      ... 26 more

      Caused by: java.net.SocketException: Broken pipe

      at java.net.SocketOutputStream.socketWrite0(Native Method)

      at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:104)

      at java.net.SocketOutputStream.write(SocketOutputStream.java:148)

      at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:101)

      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:77)

      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:135)

      at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1418)

      at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java)

      ... 30 more
    • Mahdad
      Mahdad
      59 Posts
      ACCEPTED ANSWER

      Re: Some emails sporadically not sent

      ‏2013-01-16T21:33:14Z  in response to Raj.S
      I see a broken pipe. Not sure why the connection gets broken between WC and SMTP. This works for the majority of the emails but fails for some.
      • Raj.S
        Raj.S
        519 Posts
        ACCEPTED ANSWER

        Re: Some emails sporadically not sent

        ‏2013-01-17T07:12:06Z  in response to Mahdad
        I was wondering if this is happening only for specific messages with either Invalid Email ID or Larger Message size. Can you try such error scenarios. This may help us get some clue.
        Rgds,Raj.
        • Mahdad
          Mahdad
          59 Posts
          ACCEPTED ANSWER

          Re: Some emails sporadically not sent

          ‏2013-01-17T07:46:28Z  in response to Raj.S
          Hi Raj,

          Thanks for your reponse. I don't think those are any issues. Almost all these (I can confirm this), are order confirmation emails, so they have a template which shouldn't create a huge content, so size should not be an issue.
          As for email address validation, my understanding is that it happens at SMTP level, not at WC level, so if an address is invalid, it's SMTP which retries sending it. Please clarify this.
          I still suspect it could be a closed connection issue which is the "broken pipe" issue. So for some reason, whether it's huge data which I don't think if that's the case, or some other reason, SMTP closes that connection.

          Mahdad
      • Raj.S
        Raj.S
        519 Posts
        ACCEPTED ANSWER

        Re: Some emails sporadically not sent

        ‏2013-01-17T07:43:21Z  in response to Mahdad
        I was wondering if this is happening only for specific messages with either Invalid Email ID or Larger Message size. Can you try such error scenarios. This may help us get some clue.
        Rgds,Raj.