Issue Type: Bug Bug
Affects Versions: current
Assignee: Slide-O-Mix
Components: email-ext
Created: 02/Jan/13 12:25 PM
Description:

The email-ext plugin no longer sends messages, instead it hangs after sending DATA:

10:47:33 Checking for post-build
10:47:33 Performing post-build step
10:47:33 Checking if email needs to be generated
10:47:33 Email was triggered for: Success
10:47:33 Sending email for trigger: Success
10:47:33 NOT overriding default server settings, using Mailer to create session
10:47:33 Changing BUILD_ID variable (job build time) with the date pattern yyyyMMdd.
10:47:33 Changing BUILD_ID variable (job build time) with the date pattern yyyyMMdd.
10:47:33 messageContentType = text/plain; charset=UTF-8
10:47:33 Changing BUILD_ID variable (job build time) with the date pattern yyyyMMdd.
10:47:33 Adding developers
10:47:33 Sending to requester
10:47:33 Changing BUILD_ID variable (job build time) with the date pattern yyyyMMdd.
10:47:33 Successfully created MimeMessage
10:47:33 Sending email to: [email protected]
10:48:34 ERROR: Could not send email as a part of the post-build publishers.
10:48:34 javax.mail.MessagingException: Exception reading response;
10:48:34 nested exception is:
10:48:34 java.net.SocketTimeoutException: Read timed out
10:48:34 at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2153)
10:48:34 at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1186)
10:48:34 at javax.mail.Transport.send0(Transport.java:197)
10:48:34 at javax.mail.Transport.send(Transport.java:124)
10:48:34 at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:308)
10:48:34 at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:289)
10:48:34 at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:249)
10:48:34 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
10:48:34 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
10:48:34 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
10:48:34 at hudson.ivy.IvyModuleSetBuild$RunnerImpl.cleanUp(IvyModuleSetBuild.java:606)
10:48:34 at hudson.model.Run.execute(Run.java:1587)
10:48:34 at hudson.model.Run.run(Run.java:1489)
10:48:34 at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:282)
10:48:34 at hudson.model.ResourceController.execute(ResourceController.java:88)
10:48:34 at hudson.model.Executor.run(Executor.java:236)
10:48:34 Caused by: java.net.SocketTimeoutException: Read timed out
10:48:34 at java.net.SocketInputStream.socketRead0(Native Method)
10:48:34 at java.net.SocketInputStream.read(SocketInputStream.java:129)
10:48:34 at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
10:48:34 at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
10:48:34 at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
10:48:34 at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89)
10:48:34 at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2131)
10:48:34 ... 15 more
10:48:34 Some error occured trying to send the email...check the Jenkins log
10:48:34 Finished: SUCCESS

Looking at the Postfix log in debug mode, I can see that it sends MAIL FROM and RCPT TO correctly, but after it sends DATA it does not send anything else. Eventually the connection times out and the exception above is reported in the log.

The standard email functionality continues to work as normal.

From postfix it only shows that it received 'DATA' but nothing more:

Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 220 ukfd-ecat.eu.example.com ESMTP Postfix
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: < ukfd-ecat[192.168.117.125]: EHLO ukfd-ecat
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250-ukfd-ecat.eu.example.com
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250-PIPELINING
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250-SIZE 10240000
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250-VRFY
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250-ETRN
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250-ENHANCEDSTATUSCODES
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250-8BITMIME
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250 DSN
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: < ukfd-ecat[192.168.117.125]: MAIL FROM:<[email protected]>
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250 2.1.0 Ok
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: < ukfd-ecat[192.168.117.125]: RCPT TO:<[email protected]>
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 250 2.1.5 Ok
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: < ukfd-ecat[192.168.117.125]: DATA
Jan 2 12:07:59 ukfd-ecat postfix/smtpd[32091]: > ukfd-ecat[192.168.117.125]: 354 End data with <CR><LF>.<CR><LF>

I've added -Dmail.debug=true to the JVM options and I've also enabled debug mode for email-ext, but I can't seem to get any further information.

Is there anything else I can do to help diagnose what's going wrong?

Thanks very much,
Jamie

Environment: Jenkins 1.495 and 1.496 (at least)
CentOS 6.3, Tomcat 6, JavaMail 1.4.4-1.4.6-rc1
Token Macro 1.5.1
Project: Jenkins
Labels: email-ext plugin
Priority: Major Major
Reporter: Jamie Penman-Smithson
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to