Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-61954

Scheduled Jobs Unresponsive/Hangs e.g. mail handlers stop processing emails to create issues due to database connectivity interuptions

XMLWordPrintable

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

      Summary

      Originates for SDS Bug ticket

      After configuring Receiving request by email , performing the test in Application > Email Request returns 'No problems found with email settings configuration.Successfully connected to the specified email server.', however, when click on 'View Log' , nothing is showing in connectivity log tab and processing log tab.

      Steps to Reproduce

      This can happen if any abrupt interruption occurs towards the database/JIRA itself.

      • network issue towards DB

      Expected Results

      Emails are able to be retrieved by JSD
      Scheduled Service should be clever enough to perform a retry

      Actual Results

      Emails are not able to be retrieved
      Scheduled Service are stuck

      Notes

      Looking at the Scheduled Jobs, the scheduled jobs seems to hangs and is not running (by referring to 'Next Run' date, compare with the real time of the server. The next run date/time will be backdated)

      A Number of Root Cause investigation based on the error:
      Fixing below issue can help to solve the issue as well (as a workaround)

      Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, JOB_ID, JOB_RUNNER_KEY, SCHED_TYPE, INTERVAL_MILLIS, FIRST_RUN, CRON_EXPRESSION, TIME_ZONE, NEXT_RUN, VERSION, PARAMETERS FROM public.clusteredjob WHERE JOB_ID=? (FATAL: terminating connection due to administrator command)
      
      com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (IO Error: The Network Adapter could not establish the connection)
      
      • This is due to DB is restarted/lost connection temporarily and JIRA was not restart together afterwards
      Caused by: org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Unknown server host name 'xxx.yyy.corp.com'.)
      	at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:399)
      	at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:543)
      	at org.ofbiz.core.entity.GenericDAO.createEntityListIterator(GenericDAO.java:960)
      	at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:883)
      	at org.ofbiz.core.entity.GenericHelperDAO.findListIteratorByCondition(GenericHelperDAO.java:194)
      	at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findListIteratorByCondition(DefaultOfBizDelegator.java:398)
      
      • There are DNS/routing/network issue from JIRA to Database

      Workaround

      Restart JIRA

              Unassigned Unassigned
              amasut Azfar Masut (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: