java.net.SocketTimeoutException: Read timed out

Atlassian JIRA | Kevin Kuphal | 5 years ago
  1. 0

    Emails end up in error queue. Users receives multiple endless notifications until error queue is purged. Email is sent but JIRA does not believe it was. Outbound mail log shows: {code} 2012-03-23 14:24:33,050 ERROR [FHP-MAIL-BLD] Sending mailitem To='xxx@company.com' Subject='(HLP-18617) Account disabled' From='null' FromName='XXX (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='null' MessageId='null' ServiceRunner Mail Queue Service Error occurred in sending e-mail: To='xxx@company.com' Subject='(HLP-18617) Account disabled' From='null' FromName='XXX (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='null' MessageId='null' com.atlassian.mail.MailException: javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketTimeoutException: Read timed out at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:183) at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:38) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: 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 com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:162) ... 8 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2131) ... 10 more {code}

    Atlassian JIRA | 5 years ago | Kevin Kuphal
    java.net.SocketTimeoutException: Read timed out
  2. 0

    Emails end up in error queue. Users receives multiple endless notifications until error queue is purged. Email is sent but JIRA does not believe it was. Outbound mail log shows: {code} 2012-03-23 14:24:33,050 ERROR [FHP-MAIL-BLD] Sending mailitem To='xxx@company.com' Subject='(HLP-18617) Account disabled' From='null' FromName='XXX (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='null' MessageId='null' ServiceRunner Mail Queue Service Error occurred in sending e-mail: To='xxx@company.com' Subject='(HLP-18617) Account disabled' From='null' FromName='XXX (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='null' MessageId='null' com.atlassian.mail.MailException: javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketTimeoutException: Read timed out at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:183) at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:38) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: 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 com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:162) ... 8 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2131) ... 10 more {code}

    Atlassian JIRA | 5 years ago | Kevin Kuphal
    java.net.SocketTimeoutException: Read timed out
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 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
  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. Aria Pahlavan 4 times, last 2 weeks ago
  2. poroszd 4 times, last 3 weeks ago
  3. mauritius 24 times, last 1 month ago
  4. aldrinleal 1 times, last 1 month ago
  5. Nikolay Rybak 1 times, last 1 month 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(Unknown Source)
    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(Unknown Source)
    2. java.io.BufferedInputStream.read(Unknown Source)
    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.readServerResponse(SMTPTransport.java:2153)
    4. com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1186)
    4 frames
  6. com.atlassian.mail
    SMTPMailServerImpl.send
    1. com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:162)
    1 frame