0

Jenkins version: 2.46 Here is my Jenkins configuration

enter image description here

And here is the complete stacktrace that I received

ERROR: Could not send email as a part of the post-build publishers.
javax.mail.MessagingException: Can't send command to SMTP host;
  nested exception is:
    java.net.SocketException: Broken pipe (Write failed)
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2106)
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2093)
    at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1184)
    at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:445)
    at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:345)
    at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:253)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
    at hudson.model.Build$BuildExecution.cleanUp(Build.java:196)
    at hudson.model.Run.execute(Run.java:1775)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:405)
Caused by: java.net.SocketException: Broken pipe (Write failed)
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
    at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:114)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2104)
    ... 13 more
Finished: SUCCESS

Additionally, how can I get turn on debug logs in Jenkins for this (and other) errors ?

Ankur Agarwal
  • 23,692
  • 41
  • 137
  • 208
  • Have you seen the other question referring to [`SocketException: Broken pipe`](http://stackoverflow.com/q/2309561/1744774)? What do you exactly mean by "_debug logs in Jenkins_"? – Gerold Broser Feb 15 '17 at 19:15
  • @GeroldBroser Answers to that question do not help much. I am trying to figure out what exactly went wrong and so I was hoping may be Jenkins has an option to enable detailed debug logs for problems that can help identify the root cause and a fix. – Ankur Agarwal Feb 15 '17 at 19:35
  • I'm not aware of Jenkins having such for its plugins. You can try to use `java` cmd line options, e.g. [`-Xdiag` and `-verbose:class`](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html), when starting Jenkins. There's a `log` dir inside your Jenkins installation dir and there are your system's logs. – Gerold Broser Feb 15 '17 at 19:44
  • @GeroldBroser Ok I made the changes that you suggested and restarted Jenkins and the jenkins service file. Will wait to see what happens. – Ankur Agarwal Feb 16 '17 at 00:56

0 Answers0