Uploaded image for project: 'JIRA Service Desk Server'
  1. JIRA Service Desk Server
  2. JSDSERVER-5096

Invalid characters encountered in base64 data

    XMLWordPrintable

    Details

      Description

      Issue Summary

      Service Desk email channels may get stuck and fail to process any more emails and looking at the email processor and scheduler, you would see that JIRA is still attempting to pull and process emails however no new email are being processed.

      Looking at the processing log, it would appear that JIRA has stopped processing emails however when you look at the log proper in particular after setting the incoming mail to Debug mode, it would be observed that the JIRA Service Desk mail channels are still trying to pull emails but they MailJobRunner fails because of:

      Invalid charactersencountered in base64 data.

      2017-05-05 03:45:48,228 Caesium-1-3 ERROR ServiceRunner     [c.a.m.incoming.jepp.processor] MailJobRunner Failed
      java.lang.RuntimeException: Unable to read next message
      	at com.atlassian.jira.internal.mail.processor.feature.puller.mailitem.streaming.MailItemDTOIterator.next(MailItemDTOIterator.java:51)
      	at com.atlassian.jira.internal.mail.processor.feature.puller.mailitem.streaming.MailItemDTOIterator.next(MailItemDTOIterator.java:15)
      	at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorWorker.process(MailProcessorWorker.java:75)
      	at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorService.run(MailProcessorService.java:36)
      	at com.atlassian.jira.internal.mail.processor.services.MailProcessorExecutor.run(MailProcessorExecutor.java:30)
      	at com.atlassian.jira.internal.mail.processor.services.AbstractMailExecutor.execute(AbstractMailExecutor.java:42)
      	at com.atlassian.jira.internal.mail.processor.services.MailJobRunner.runJob(MailJobRunner.java:35)
      	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153)
      	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118)
      	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:401)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:396)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:349)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:255)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:252)
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65)
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59)
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: invalid characters encountered in base64 data
      	at org.bouncycastle.util.encoders.Base64Encoder.decode(Unknown Source)
      	at com.atlassian.jira.internal.mail.processor.feature.puller.mailitem.streaming.MailItemTupleConsumer.decodeChunk(MailItemTupleConsumer.java:82)
      	at com.atlassian.jira.internal.mail.processor.feature.puller.mailitem.streaming.MailItemTupleConsumer.consumeRow(MailItemTupleConsumer.java:65)
      	at com.atlassian.jira.internal.mail.processor.feature.puller.mailitem.streaming.MailItemDTOIterator.readNextMessageFully(MailItemDTOIterator.java:71)
      	at com.atlassian.jira.internal.mail.processor.feature.puller.mailitem.streaming.MailItemDTOIterator.next(MailItemDTOIterator.java:47)
      
      Environment

      This error from all occurrences seems to affect Microsoft Exchange Server.

      Diagnosis
      1. When you view the processing log tab, there would be no sign of JIRA attempting to process any new emails.
      2. When you view the log, you would see the error above.
      Expected Behavior

      JIRA would be able to ignore this email and continue to process other mails rather than having this one email blocking the whole mail channel.

      Actual Behavior

      JIRA would not be processing any new emails and keep throwing the error mentioned.

      Workaround

      The problem causing message must be removed in order for the mail processor to process any further mail.

      To remove the message:

      1. Identify the ID of the message (mail item) that needs to be removed (see kb article)
      2. Remove the mail item from the database:
        • delete from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" = <id to delete>;
          delete from "AO_2C4E5C_MAILITEM" where "ID" = <id to delete>;
          
        • These commands must be performed in this order.
      Alternate Workaround

      Delete the JIRA email channel and create it again.

      This however would still leave the old emails in the database but JIRA would be processing the emails from the new email channel id.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cpollock Christopher Pollock (Inactive)
              Reporter:
              ijimoh Ismael Olusula Jimoh
              Votes:
              26 Vote for this issue
              Watchers:
              37 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: