Details
-
Bug
-
Resolution: Fixed
-
High
-
115
-
Severity 2 - Major
-
35
-
Description
An first version of the fix for this issue was released on the 15th of December. However, this has been reverted back due to some undesired side-effects.
We are currently investigating what caused the side-effects. A second version of the fix will be released asap.
_____
Summary
Mail handlers are creating duplicated tickets. It seems like what happens is:
- The mail handler starts processing a big message, (a big one or one with attachments for example).
- The mail handler takes longer than the configured delay to finish processing this message. The default delay is 1 minute.
- When the configured delay finishes, the mail handler accesses the mail box and starts processing the same message again.
- It happens because JIRA didn’t finish processing the message in the first time and due to this the message was not deleted yet.
Steps to Reproduce
- Send an email with attachments to a mail handler with the default timeout (1 min)
Expected Results
The mail handler should process this email and create 1 issue with it
Actual Results
The connection to the mail server closes before the handler is done processing the email. Therefore that email is not removed from the mail server and at the next run the handler will process the same email again, creating duplicated issues.
The below lines are found in the logs:
ERROR com.atlassian.mail.incoming.mailfetcherservice MAIL_HANDLER_NAME: The connection is no longer open, messages marked as deleted will not be purged from the remote server: imap.gmail.com until the next run. 2017-09-27 22:48:36.967 ERROR com.atlassian.mail.incoming.mailfetcherservice MAIL_HANDLER_NAME: The folder has been closed on us, stop processing any more emails: * BYE JavaMail Exception: java.net.SocketTimeoutException: Read timed out * BYE JavaMail Exception: java.net.SocketTimeoutException: Read timed out javax.mail.FolderClosedException: * BYE JavaMail Exception: java.net.SocketTimeoutException: Read timed out at com.sun.mail.imap.IMAPMessage.loadFlags(IMAPMessage.java:1557) at com.sun.mail.imap.IMAPMessage.isSet(IMAPMessage.java:1021) ......
Notes
This issue has multiple root-causes and it is not necessarily caused by emails bigger than 10MB. It is enough that the email handler is not done processing the incoming emails within the configured time interval.
Currently we fixed the timeout that was closing the connection before the handler is done processing so now this issue should occur less often. Once we will also fix the other cause (emails too big) then we will mark this bug a resolved.
Workaround
- Increase the delay configuration in the mail handler, OR
- Remove the mails to archive or move them to a different folder/mailbox from the one that JIRA is trying to scan through. (more information in Logs Contain 'Exception: null javax.mail.FolderClosedException' when JIRA using IMAP mail server)
Attachments
Issue Links
- is duplicated by
-
JRACLOUD-67729 Mail Handler creating duplicated comments
- Closed
-
JDEV-38651 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...