Apparently, retry handling for the "connetion refused" case does not yet work properly.

I do observe the following stack trace whenever the SMTP server is unreachable:

javax.mail.MessagingException: Could not connect to SMTP host: mail.example.net, port: 25;
nested exception is:
java.net.ConnectException: Connection refused
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:305)

...but I can never see a "Socket error sending email, retrying once more in 10 seconds" message.

I suspect that the root cause is that Transport.send() will not throw a SendFailedException in this case, but rather a MessagingException. However, the plugin code only catches SendFailedException.

(Tested with version email-ext-2.37.2.2, but exception type handling is identical on master.)

Could you please check?

Change By: Alexander Ost (29/Jul/14 8:42 AM)
Resolution: Fixed
Status: Resolved Reopened
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

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to