Outgoing SMTP not Sending out Mail

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

JIRA is throwing a java.net.ConnectException when attempting to send mail through the SMTP.

After enabling the Outgoing Mail log in Administration > System > Troubleshooting and Support > Logging and Profilingthe following error logs message appears in the atlassian-jira-outgoing-mail.log:

com.atlassian.mail.MailException: javax.mail.MessagingException: Could not connect to SMTP host: VIAMASCPH011.no.via.as, port: 25;
  nested exception is:
	java.net.ConnectException: Connection refused: connect
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:201)
	at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:44)
	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: Could not connect to SMTP host: VIAMASCPH011.no.via.as, port: 25;
  nested exception is:
	java.net.ConnectException: Connection refused: connect
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
	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 com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:172)
	... 8 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:529)
	at java.net.Socket.connect(Socket.java:478)
	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:319)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:233)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1938)
	... 13 more

Verification

Anti-virus is installed on the JIRA server and all the below troubleshooting steps have been followed:

  1. Checked all the outgoing SMTP mail server settings (all correct).
  2. No SSL / Proxy / Firewall is being configured in the environment.
  3. Set up a test Gmail account as outgoing SMTP mail server (not working, error: connection timeout).
  4. Ping the SMTP telnet port (all working fine, port is open and connection is established and able to get through and received reply).
  5. Increase the timeout value but still keep getting error: connection timeout.

原因

This is actually due to the anti-virus running on the JIRA server environment which could possibly block the connection between JIRA to the mail server.

ソリューション

  1. Identify which tomcat process is running in the background for JIRA (this can be checked in Task Manager > Processes). This will typically be tomcat.exe, tomcat5.exe, tomcat5w.exe, tomcat6.exe, tomcat7.exe, for example:

  2. Set the exception for the tomcat process that you are running with JIRA in the anti-virus.
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.