Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-1762

Issue Creation via Email failed if Email contain Base64 attachments

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Service Desk Cloud. Using JIRA Service Desk Server? See the corresponding bug report.

      Problem Description

      • The SD incoming mail stops processing further.
      • At times, if the issue is already created, it returns error as Unable to create comment. Note: This does not halt the email from further processing.

      Diagnostic

      On the logs with incoming mail debug enabled, it seems to stuck on a particular mail.

      2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Starts processing mail item [id: 3063] ...
      2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Checking if mail item [id: 3063] is a mail loop ...
      2015-03-20 11:25:09,138 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Detected mail item [id: 3063] as a mail loop
      

      The example above shows ID: 3063

      Verify whether is the ID being returned from the query below:

      select count(*),"MAIL_ITEM_ID" from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" in (select "ID" from "AO_2C4E5C_MAILITEM" where "STATUS" = 'NEW') group by "MAIL_ITEM_ID" having count(*)>=2 order by count(*) desc;
      

      If yes, then it is most likely to hit into this bug.

      Explanation

      Email stores attachment as base64 embedded to the mail body. When the mail process trying to process, it only process the first row where it ends up halt due to the incomplete data to decode the base64 attachment.

      At times when the email is detected to be added as comment, it will not halt the email processing but will return as error. The cause for it is the same, it somehow error out when decoding the base64.

      Workaround

      If you wish to recover the email content before deletion, follow the KB below:

      Then you can proceed with deleting the affected ID that stuck, refer to the steps below:

      1. Backup the database
      2. Delete following the command below:
        delete from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" = <id from above>;
        delete from "AO_2C4E5C_MAILITEM" where "ID" = <id from above>;
        

      NOTE: For Cloud customer, please inform support team to perform troubleshooting and workaround for this bug.

      JEPP version 1.0.28-D20150313T043758

      Attachments

        Issue Links

          Activity

            People

              knguyen@atlassian.com Kha Nguyen (Inactive)
              rgee Richie Gee (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: