java.net.SocketTimeoutException: Read timed out

Jenkins JIRA | Jamie Penman-Smithson | 4 years ago
  1. 0

    The email-ext plugin no longer sends messages, instead it hangs after sending DATA: {quote} 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: Jamie.Penman-Smithson@example.com 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 {quote} 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: {quote} 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:<eubuild@example.com> 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:<Jamie.Penman-Smithson@example.com> 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> {quote} 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

    Jenkins JIRA | 4 years ago | Jamie Penman-Smithson
    java.net.SocketTimeoutException: Read timed out
  2. 0

    The email-ext plugin no longer sends messages, instead it hangs after sending DATA: {quote} 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: Jamie.Penman-Smithson@example.com 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 {quote} 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: {quote} 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:<eubuild@example.com> 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:<Jamie.Penman-Smithson@example.com> 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> {quote} 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

    Jenkins JIRA | 4 years ago | Jamie Penman-Smithson
    java.net.SocketTimeoutException: Read timed out
  3. 0

    Build step 'Execute shell' marked build as failure Sending e-mails to: Yaniv.Kaul@abc.com ERROR: Exception reading response javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketTimeoutException: Read timed out at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2153) at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1186) at javax.mail.Transport.send0(Transport.java:197) at javax.mail.Transport.send(Transport.java:124) at hudson.tasks.MailSender.execute(MailSender.java:116) at hudson.tasks.Mailer.perform(Mailer.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1628) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:146) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2131) ... 14 more Take node offline on failure is waiting for a checkpoint on hacomb #161 It worked before, so I'm not sure what has changed.

    Jenkins JIRA | 3 years ago | Yaniv Kaul
    java.net.SocketTimeoutException: Read timed out
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Build step 'Execute shell' marked build as failure Sending e-mails to: Yaniv.Kaul@abc.com ERROR: Exception reading response javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketTimeoutException: Read timed out at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2153) at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1186) at javax.mail.Transport.send0(Transport.java:197) at javax.mail.Transport.send(Transport.java:124) at hudson.tasks.MailSender.execute(MailSender.java:116) at hudson.tasks.Mailer.perform(Mailer.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1628) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:146) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2131) ... 14 more Take node offline on failure is waiting for a checkpoint on hacomb #161 It worked before, so I'm not sure what has changed.

    Jenkins JIRA | 3 years ago | Yaniv Kaul
    java.net.SocketTimeoutException: Read timed out

  1. mauritius 93 times, last 3 days ago
  2. Aria Pahlavan 4 times, last 3 weeks ago
  3. poroszd 4 times, last 1 month ago
  4. aldrinleal 1 times, last 2 months ago
  5. Nikolay Rybak 1 times, last 2 months ago
11 more registered users
70 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.SocketTimeoutException

    Read timed out

    at java.net.SocketInputStream.socketRead0()
  2. Java RT
    SocketInputStream.read
    1. java.net.SocketInputStream.socketRead0(Native Method)
    2. java.net.SocketInputStream.read(SocketInputStream.java:129)
    2 frames
  3. JavaMail API (compat)
    TraceInputStream.read
    1. com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
    1 frame
  4. Java RT
    BufferedInputStream.read
    1. java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    2. java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    2 frames
  5. JavaMail API (compat)
    SMTPTransport.close
    1. com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89)
    2. com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2131)
    3. com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1186)
    3 frames
  6. JavaMail API
    Transport.send
    1. javax.mail.Transport.send0(Transport.java:197)
    2. javax.mail.Transport.send(Transport.java:124)
    2 frames
  7. Hudson Email Extension Plugin
    ExtendedEmailPublisher.perform
    1. hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:308)
    2. hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:289)
    3. hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:249)
    3 frames
  8. Hudson
    AbstractBuild$AbstractBuildExecution.performAllBuildSteps
    1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
    3 frames
  9. hudson.ivy
    IvyModuleSetBuild$RunnerImpl.cleanUp
    1. hudson.ivy.IvyModuleSetBuild$RunnerImpl.cleanUp(IvyModuleSetBuild.java:606)
    1 frame
  10. Hudson
    Run.run
    1. hudson.model.Run.execute(Run.java:1587)
    2. hudson.model.Run.run(Run.java:1489)
    2 frames
  11. hudson.ivy
    IvyModuleSetBuild.run
    1. hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:282)
    1 frame
  12. Hudson
    Executor.run
    1. hudson.model.ResourceController.execute(ResourceController.java:88)
    2. hudson.model.Executor.run(Executor.java:236)
    2 frames