Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-6539

"Snap! You can't view this page" error after migrating from Cloud to Server

    XMLWordPrintable

Details

    Description

      Issue description

      After migrating Jira from Cloud to Server, Service Desk project administrators might get the "Snap! You can't view this page" error when trying to access any Service Desk specific setting (Request Type, SLA, Automation...).

      Diagnosis Steps

      To verify if you are impacted by this bug, check if you can find the following error in the file atlassian-servicedesk.log:

      2019-07-24 16:53:55,569 JIRA-EventThread-10 ERROR removed XXXXXXX xxxxx XXX.XXX.XX.XXX /plugins/servlet/applications/versions-licenses/add-licenses/jira-servicedesk/evaluation [bootstrap.lifecycle.server.ServerPluginLifeCycle] org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,11104][issue,134138][textvalue,{"timeline":{"events":[{"date":1562687139307,"types":["START"]},{"date":1562710975499,"types":["STOP"]}]},"ongoingSLAData":null,"completeSLAData":[{"succeeded":true,"goalTime":28800000,"elapsedTime":22975499,"calendarName":"Sample 9-5 Calendar","startTime":1562687139307,"stopTime":1562710975499}],"metricId":12,"definitionChangeDate":null,"definitionChangeMsEpoch":0,"goalsChangeDate":null,"goalsChangeMsEpoch":null,"goalTimeUpdatedDate":null,"goalTimeUpdatedMsEpoch":null,"metricCreatedDate":null}][id,2292400][updated,1563987235564] (SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_customfieldvalue"
        Detail: Key (id)=(2292400) already exists.))
      com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,11104][issue,134138][textvalue,{"timeline":{"events":[{"date":1562687139307,"types":["START"]},{"date":1562710975499,"types":["STOP"]}]},"ongoingSLAData":null,"completeSLAData":[{"succeeded":true,"goalTime":28800000,"elapsedTime":22975499,"calendarName":"Sample 9-5 Calendar","startTime":1562687139307,"stopTime":1562710975499}],"metricId":12,"definitionChangeDate":null,"definitionChangeMsEpoch":0,"goalsChangeDate":null,"goalsChangeMsEpoch":null,"goalTimeUpdatedDate":null,"goalTimeUpdatedMsEpoch":null,"metricCreatedDate":null}][id,2292400][updated,1563987235564] (SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_customfieldvalue"
      

      Root cause

      The root cause is unknown at this moment, as we have been unable to reproduce this issue on Atlassian side. For this reason, it is not guarantee that any customer migrating from Cloud to Server will run into this bug.

      Note that a similar bug was reported in the past in https://jira.atlassian.com/browse/JSDSERVER-6538 when customers were migrating from Cloud to Server. However, that bug was fixed in JSD 3.2.6, therefore this seems to be a new unrelated bug.

      Workaround

      The error in the logs is addressed in the KB article Cannot insert duplicate key in object when adding content to a JIRA application, therefore the resolution steps are the same, except for the affected table which is different.

      We have adjusted the steps below for this specific bug.

      First, let's confirm that the workaround applies to your situation by following the steps below:

      1. Connect to the Jira database
      2. Check the max ID value from the customfieldvalue by running the following query (query 1):
        select max(ID) from "customfieldvalue"
      3. Check the actual sequence from the sequence_value_item table for the Custom Field Value by running the following query (query 2):
        select * from "sequence_value_item" where seq_name = 'CustomFieldValue';
      4. Verify that the max ID from the customfieldvalue table is higher than the value from the sequence_value_item in your database (although in a normal situation, it should be lower). If that's the case, then the workaround below applies to you

      Workaround steps:

      1. Stop Jira
      2. Backup your Jira database, so that you can revert back the changes if anything goes wrong
      3. Connect to the Jira database
      4. Update the sequence_value_item table by running the following query (query 3) and replacing xxxxx with the value from the results of query 1 + 1 (for example, if the result from query 1 was 1000, update xxxxx using 1001):
        update "sequence_value_item" set seq_id = xxxxx where seq_name = 'CustomFieldValue';
      5. Start Jira
      6. Access a Service Desk project configuration page, and check if you are still facing the same issue

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jrey Julien Rey
              Votes:
              24 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync