The Jira Scheduler administration page is showing errors for the MailCleanerJobRunner and MailPullerJobRunner jobs

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only. This article only applies to Atlassian products on the server and data center platforms.

   

Summary

The Jira Scheduler administration page ⚙ > System > Scheduler Details is showing errors for the MailCleanerJobRunner and MailPullerJobRunner jobs, as shown in the screenshot below:


A consequence of such errors might be that the Service Management Mail Handler (configured in Project Settings > Email Requests) can no longer process incoming emails.

Environment

Any Jira version version 8.x and/or Jira Service Management Version 4.x.

Diagnosis

Looking into the Jira application logs, the following errors can be found:

  • Error related to the MailPuller job

    2021-10-20 02:24:25,668-0400 ERROR [] Caesium-1-4 ServiceRunner     MailJobRunner Failed
    java.lang.IllegalStateException: Connection accessed outside the scope of a callback passed to com.atlassian.sal.api.rdbms.TransactionalExecutor
    	at com.atlassian.sal.core.rdbms.WrappedConnection.connection(WrappedConnection.java:62) [?:?]
    	at com.atlassian.sal.core.rdbms.WrappedConnection.getMetaData(WrappedConnection.java:195) [?:?]
    	at com.atlassian.pocketknife.internal.querydsl.dialect.DefaultDialectConfiguration.buildTemplates(DefaultDialectConfiguration.java:111) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.internal.querydsl.dialect.DefaultDialectConfiguration.detect(DefaultDialectConfiguration.java:72) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.internal.querydsl.util.MemoizingResettingReference.lambda$get$0(MemoizingResettingReference.java:59) [jira-email-processor-plugin-2.11.0.jar:?]
    
    ...
    
    	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131) [atlassian-plugins-osgi-bridge-5.2.3-96cf760eb.jar:?]
    	at com.sun.proxy.$Proxy177.executeQuery(Unknown Source) [?:?]
    	at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.borrowConnectionAndExecute(JiraHostConnectionAccessor.java:84) [?:?]
    	at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:48) [?:?]
    	at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:40) [?:?]
    	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:67) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInNewTransaction(DatabaseAccessorImpl.java:38) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.api.querydsl.DatabaseAccessor.runInNewTransaction(DatabaseAccessor.java:54) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.runInNewTransaction(QueryDslHelper.java:49) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.feature.cleaner.MailCleanerManager.cleanUpItemsBefore(MailCleanerManager.java:43) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.services.MailCleanerExecutor.run(MailCleanerExecutor.java:42) [jira-email-processor-plugin-2.11.0.jar:?]
    
    ...
    
    	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35) [atlassian-scheduler-caesium-3.0.2.jar:?]
  • Error related to the MailCleaner job

    2021-10-20 02:24:32,160-0400 ERROR [] Caesium-1-3 ServiceRunner     MailJobRunner Failed
    java.lang.NoSuchMethodError: com.atlassian.sal.api.rdbms.TransactionalExecutor.getSchemaName()Lcom/atlassian/fugue/Option;
    	at com.atlassian.pocketknife.internal.querydsl.schema.ProductSchemaProvider.getProductSchema(ProductSchemaProvider.java:26) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.internal.querydsl.schema.DefaultSchemaProvider.getProductSchema(DefaultSchemaProvider.java:64) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.internal.querydsl.dialect.DefaultDialectConfiguration.enrich(DefaultDialectConfiguration.java:80) [
    
    ...
    
    	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:67) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInNewTransaction(DatabaseAccessorImpl.java:38) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.pocketknife.api.querydsl.DatabaseAccessor.runInNewTransaction(DatabaseAccessor.java:54) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.list(QueryDslHelper.java:273) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.feature.channel.MailChannelStore.getEnabledMailChannels(MailChannelStore.java:41) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.feature.channel.MailChannelManager.getEnabledMailChannelsFiltered(MailChannelManager.java:92) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.feature.channel.MailChannelManager.getValidMailChannels(MailChannelManager.java:79) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.feature.puller.MailPullerWorker.recordSuspendAuditLogForAllValidChannels(MailPullerWorker.java:169) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.feature.puller.MailPullerService.run(MailPullerService.java:37) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.services.MailPullerExecutor.run(MailPullerExecutor.java:29) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.services.AbstractMailExecutor.execute(AbstractMailExecutor.java:45) [jira-email-processor-plugin-2.11.0.jar:?]
    	at com.atlassian.jira.internal.mail.processor.services.MailJobRunner.runJob(MailJobRunner.java:35) [jira-email-processor-plugin-2.11.0.jar:?]
    
    ...
    
    	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35) [atlassian-scheduler-caesium-3.0.2.jar:?]

Checking the application.xml file in the support zip (or the add-ons in the page ⚙ > Manage Apps > Manage Apps), we should see that an old version of the add-on com.atlassian.jira.jira-email-processor-plugin is installed, which is different from the add-on that ships with the Jira Service Management version compatible with the Jira version that is being used:

<plugin>
  <key>com.atlassian.jira.jira-email-processor-plugin</key>
  <name>jira-email-processor-plugin</name>
  <version>2.11.0</version>
  <vendor>Atlassian</vendor>
  <status>ENABLED</status>
  <vendor-url>http://www.atlassian.com/</vendor-url>
  <framework-version>2</framework-version>
  <bundled>User installed</bundled>
</plugin>

For example, if Jira 8.5.6 is in use, then the compatible Jira Service Management version is 4.5.6 and the version of the add-on com.atlassian.jira.jira-email-processor-plugin should be 4.5.6 too:

<plugin>
  <key>com.atlassian.jira.jira-email-processor-plugin</key>
  <name>jira-email-processor-plugin</name>
  <version>4.5.6</version>
  <vendor>Atlassian</vendor>
  <status>ENABLED</status>
  <vendor-url>http://www.atlassian.com/</vendor-url>
  <framework-version>2</framework-version>
  <bundled>User installed</bundled>
</plugin>


Cause

An incompatible/old version of the add-on com.atlassian.jira.jira-email-processor-plugin is installed in the Jira application.

The exact reason why this incompatible version ended up being installed is not entirely clear. It is possible that at some point, an old version of Jira Service Management was installed (for example 2.x or 3.x) with Jira (6.x or 7.x), and then Jira got upgraded to 8.x but Service Management did not get upgraded at the same time, or failed to be upgraded and as a result the add-on com.atlassian.jira.jira-email-processor-plugin which came with the old Jira Service Management version remained installed in the Jira application.

Solution

  1. Download the zip archive of the Jira Service Management version which is compatible with the Jira version you are using, from this link
    1. To find out which Jira Service Management version (formerly called Service Desk) is compatible with Jira, you can refer to the application compatibility matrix
    2. For example, if you are using Jira 8.5.6, the compatible Jira Service Management version is 4.5.6
  2. Unzip the zip archive
  3. Look for the file jira-email-processor-plugin-XXXXX located in the unzipped archive in /atlassian-jira/WEB-INF/application-installation/jira-servicedesk-application
  4. Stop the Jira application
  5. Go into the folder <JIRA_HOME>/plugins/installed-plugins
  6. Delete the old jira-email-processor-plugin-XXXXX file in that folder, and replace it with the new jira-email-processor-plugin-XXXXX file that was downloaded from the zip archive
  7. Start the Jira application
  8. Verify that the MailPuller and MailCleaner jobs are no longer showing any error in the page ⚙ > System > Scheduler Details

If the steps above don't help resolve the issue, or if you need help, please reach out to Atlassian Support via this page.



Last modified on Oct 20, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.