Slow Email Send from Jenkins

327 views
Skip to first unread message

Brian Lee

unread,
Feb 3, 2014, 3:50:05 PM2/3/14
to jenkins...@googlegroups.com
Using the Mailer plugin in Jenkins (on Windows 7) to send a test email from the Configure screen gets the spinning graphic for a full 95 seconds. Then the email is sent successfully.

I can hit the same smtp sever from the command prompt outside Jenkins and send nearly instantly. Same command inside Jenkins as a Build Step = slow as the test email above.

The emails are always sent. Just that it takes much longer when done from Jenkins or a Jenkins-launched build.

Non-email operations inside Jenkins are performing as expected. Just email from Jenkins is slow.

I've done a lot of googling, suggestions appreciated...


Slide

unread,
Feb 3, 2014, 3:53:03 PM2/3/14
to jenkins...@googlegroups.com
Can you enable debug mode for JavaMail? You can enable it using a command line property

-Dmail.debug=true

This should dump some additional information to stdout/stderr that may give some clues.

slide


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Website: http://earl-of-code.com

Brian Lee

unread,
Feb 3, 2014, 4:44:03 PM2/3/14
to jenkins...@googlegroups.com
Thank you it does give some clues. It's slow at the point of connecting AND disconnecting:

.....
DEBUG SMTP: trying to connect to host "mail.xxxx.com", port 25, isSSL false             // long pause at this line
.....
221 Closing connection. Good bye.                                                                            // long pause before this line, which is the last logged line

No such pause outside Jenkins. 

Slide

unread,
Feb 3, 2014, 5:23:43 PM2/3/14
to jenkins...@googlegroups.com
Perhaps it has something to do with IPv6 vs. IPv4? I'm just guessing here, but I've seen something like that in the past.

Marc MacIntyre

unread,
Feb 3, 2014, 5:28:22 PM2/3/14
to jenkins...@googlegroups.com
Is jenkins providing the same "HELO" or "EHLO" hostname as you're using on the command line?  This could be an issue with greylisting because of a hostname mismatch or DNS lookup issues.

It would be interesting to re-run your cli test using the same envelope data and see if you get the same slowdown.

Also, if you have the mail server logs, it may have some interesting info.
Marc MacIntyre

Slide

unread,
Feb 3, 2014, 5:49:14 PM2/3/14
to jenkins...@googlegroups.com
The Mailer plugin, just uses JavaMail, but I agree, it could be something like you mention.

Brian Lee

unread,
Feb 10, 2014, 9:34:26 AM2/10/14
to jenkins...@googlegroups.com
At peak frustration I started looking at the Symantec software running on the sending box, and came across "Enable Email Auto-Protect" in the Symantec Virus and Spyware settings. When that is enabled, the delay happens. Disabled, the email send is instant. 

Slide

unread,
Feb 10, 2014, 10:31:36 AM2/10/14
to jenkins...@googlegroups.com
I really hate those type of programs, but glad you got it solved, or pseudo-solved anyway.
Reply all
Reply to author
Forward
0 new messages