Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smtp localhost port 25 hardcoded in post-build publisher #169

Open
ghost opened this issue Oct 5, 2015 · 1 comment
Open

smtp localhost port 25 hardcoded in post-build publisher #169

ghost opened this issue Oct 5, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 5, 2015

My docker-compose.yml has smtp setup as host:mailman port:25 per https://github.com/DotCi/jenkinsci-dotci-example

mailman:
  image: catatnight/postfix
  environment:
    maildomain: "mail.example.com"
    smtp_user: "user:password"
  ports:
    - "25:25"

and this works great where I'm able to test sending email via http://xxx.ngrok.io/configure

Test email #1
Inbox
    x
valdis.vitayaudom@gmail.com

9:57 AM (14 minutes ago)

to me
This message may not have been sent by: valdis.vitayaudom@gmail.com  Learn more  Report phishing
This is test email #1 sent from Jenkins

But clearly http://xxx.ngrok.io/job/vvitayau/job/docker-sshd/9 failed due to extension per

ERROR: Could not send email as a part of the post-build publishers.

javax.mail.MessagingException: Could not connect to SMTP host: localhost, 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 com.groupon.jenkins.notifications.EmailNotifierBase.sendMail(EmailNotifierBase.java:85)
    at com.groupon.jenkins.notifications.EmailNotifierBase.notify(EmailNotifierBase.java:67)
    at com.groupon.jenkins.notifications.PostBuildNotifier.perform(PostBuildNotifier.java:52)
    at com.groupon.jenkins.buildtype.install_packages.InstallPackagesBuild.runNotifiers(InstallPackagesBuild.java:92)
    at com.groupon.jenkins.buildtype.install_packages.InstallPackagesBuild.runBuild(InstallPackagesBuild.java:83)
    at com.groupon.jenkins.dynamic.build.DynamicBuild$DynamicRunExecution.doRun(DynamicBuild.java:211)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
    at hudson.model.Run.execute(Run.java:1741)
    at com.groupon.jenkins.dynamic.build.DynamicBuild.run(DynamicBuild.java:96)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:408)

Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at java.net.Socket.connect(Socket.java:538)
    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
    ... 17 more

Some error occured trying to send the email...check the Jenkins log

setting commit status on Github for https://api.github.com/repos/vvitayau/docker-sshd/commit/c2d55232693f511ad2937e8a3b4d8710747aaf5c

Finished: FAILURE
@ghost ghost changed the title DotCi plugin extension for html publisher appears to be hardcoded smtp localhost port 25 hardcoded in post-build publisher Oct 5, 2015
@ghost
Copy link
Author

ghost commented Oct 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants