Jira notification emails fail to be sent due to read timed out error

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

Jira applications fail to send outbound mail, throwing the below exception in the logs. This occurs even if the system memory has been increased and the SMTP server has been verified as not blocking the Jira applications from sending emails.

atlassian-jira.log に次のエラーが返される。

2011-04-04 16:43:03,841 http-8080-4 ERROR the.hulk 1002x152x1 1wkhzzq 11.22.33.xx,127.0.0.1 /secure/admin/SendBulkMail.jspa [action.admin.mail.SendBulkMail] Error sending e-mail.
com.atlassian.mail.MailException: javax.mail.MessagingException: Exception reading response;
  nested exception is:
    java.net.SocketTimeoutException: Read timed out
    at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169)
    at com.atlassian.jira.web.action.admin.mail.SendBulkMail.doExecute(SendBulkMail.java:252)
    at webwork.action.ActionSupport.execute(ActionSupport.java:165)

Note that other errors might also be thrown in the Jira logs:

  • 例 1

    2016-03-11 09:56:47,557 WARN [] Sending mailitem com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem@6c57ea6 username 123x4567x8 abcde1 1.2.3.4 /secure/admin/MailQueueAdmin.jspa An error has occurred whilst closing the connection to the outgoing mail server: AA ServiceDesk Out. This could be caused by a time-out on closing this connection, increase the timeout in smtp server configuration. Alternatively, set the 'mail.smtp.quitwait' (or 'mail.smtps.quitwait' for ssl) system property to false.
    javax.mail.MessagingException: Can't send command to SMTP host;
          nested exception is:
            java.net.SocketException: Software caused connection abort: socket write error
        at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2163) [mail-1.4.5.jar:1.4.5]
        at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2150) [mail-1.4.5.jar:1.4.5]
        at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1220) [mail-1.4.5.jar:1.4.5]
        at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:183) [atlassian-mail-2.5.6.jar:?]
        at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:150) [atlassian-mail-2.5.6.jar:?]
        at com.atlassian.support.tools.salext.mail.AbstractSupportMailQueueItem.send(AbstractSupportMailQueueItem.java:61) [plugin.2238643682187341319.stp-3.7.22_1457584780532.jar:3.7.22]
        at com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem.send(SupportRequestMailQueueItem.java:56) [plugin.2238643682187341319.stp-3.7.22_1457584780532.jar:3.7.22]
    ...
  • 例 2

    2016-03-11 09:56:47,557 ERROR [] Sending mailitem com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem@6c57ea6 username 123x4567x8 abcde1 1.2.3.4 /secure/admin/MailQueueAdmin.jspa Error occurred in sending e-mail: com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem@6c57ea6
    com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
    
    at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:213) [atlassian-mail-2.5.6.jar:?]
    at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:150) [atlassian-mail-2.5.6.jar:?]
    at com.atlassian.support.tools.salext.mail.AbstractSupportMailQueueItem.send(AbstractSupportMailQueueItem.java:61) [?:?]
    at com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem.send(SupportRequestMailQueueItem.java:56) [?:?]
    at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) [atlassian-mail-2.5.6.jar:?]
    at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:51) [JiraMailQueue$1.class:?]
    at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:48) [JiraMailQueue$1.class:?]
    at com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory.runWithStaticBaseUrl(DefaultVelocityRequestContextFactory.java:110) [DefaultVelocityRequestContextFactory.class:?]
    at com.atlassian.jira.util.DefaultBaseUrl.runWithStaticBaseUrl(DefaultBaseUrl.java:50) [DefaultBaseUrl.class:?]
    ...
    

環境

Jira Server/Data Center on any version from 8.0.0.

原因

This is known to be caused by one of the following:

  • The network cannot transfer the data to the mail server within the specified time interval in the mail server timeout (this can subsequently cause Jira to exhibit the bug JRASERVER-67825 - Outgoing mail: Read timed out results in duplicate notifications)
  • Exchange servers have Message Throttling - Jira applications will send outbound mail dependent upon the mail configuration, which is by default every minute. At this point a significant number of queued mails may be sent within a short period of time, causing throttling to engage.
  • Inbound rules in the network security group (Network Network Deny) on the application is blocking the incoming mail server acknowledgment message after Jira initiates the connection to the mail server. 

ソリューション

  • Increase the timeout value for the mailbox(s) affected as in our Configuring an SMTP mail server to send notifications documentation. Increasing the value in increments of 10000 (10 seconds) is suggested until the errors are resolved. We also recommend contacting the network administrator to isolate any causes of network traffic slowness. For example, an Anti-virus application scanning all outbound traffic may contribute to this behavior.

AWS または DigitalOcean Droplet で Jira を実行している場合

AWS 環境または DigitalOcean Droplet で Jira アプリケーションを実行している場合、SMTP サーバーに接続しようとしたときに次のエラーが発生する可能性があります。


java.net.SocketTimeoutException: connect timed out
 
DEBUG SMTP: trying to connect to host "email-smtp.us-east-1.amazonaws.com", port 465, isSSL true
220 email-smtp.amazonaws.com ESMTP SimpleEmailService-1062777087 BbfCtWdIGnSiqZ8zpXzm
DEBUG SMTP: connected to host "email-smtp.us-east-1.amazonaws.com", port: 465
EHLO 12.34.65.78
421 Timeout waiting for data from client.


このような場合、Amazon または DigitalOcean サポートに、ご利用の環境での SMTP アクセスを依頼してください。これらのクラウド プロバイダーは通常は既定で有効化されたスパム ブロッカーを保持しており、これらが SMTP 接続の試行をブロックしている場合があります。

  • ルールを取り除き、メールがキューからフラッシュされることを確認します。 


説明 Jira アプリケーションでメールの送信に失敗し、ログに次の例外が返される。これは、システム メモリが追加され、Jira サーバー アプリケーションによるメールの送信を SMTP サーバーがブロックしていないことが確認された場合でも発生します。
製品Jira
プラットフォームServer
最終更新日: 2025 年 1 月 28 日

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

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