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

Service Desk functionality fails with error 'You need to be a Service Desk Agent to access this page' after restoring cloud backup to server

      Atlassian Update: 21 November 2016

      We have identified number of issues why the import problem are not resolved for the Service Desk projects.

      Team has identified 2 separate issues:

      • Service Desk permissions lost when importing CloudData into Server
      • Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud JSD-4190

       

      Service Desk permissions lost when importing CloudData into Server

      This issue was planned to be shipped with 7.2.3 release and that's when issue got resolved. After number of issue comments I've reopened the issue. Root cause analysis identified that JIRA Service Desk 7.2.3 / Service Desk Application, in fact has, not shipped the code changes that addresses the fix.

      We have addressed this issue and upcoming JIRA Service Desk 7.2.5 and Service Desk application 3.2.5 will be shipping all the necessary changes.

       

      Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud

      This issue has been discovered later, and identified as a separate issue and tracked as JSD-4190.
      The fix for this is included in JIRA Service Desk 7.2.5 and Service Desk application 3.2.5

       

      Service Desk throws NullPointerException when request types are missing the ICON_ID

      This issue has been discovered in certain customer data sets. Issue is tracked as JSD-4227. The fix for this is scheduled for Service Desk application 3.2.6.

       

       Atlassian Support can provide a workaround for the cases described in JSD-4190, and JSD-4227 please contact the team if upgrading or waiting for 7.2.5 is not an option. These requests can be raised at http://support.atlassian.com

       

      Cheers,
      Ignat
      JIRA Bugmaster.

       

      Problem

      After restoring backup from Cloud, viewing a Service Desk project will be restricted with message Snap! You can't view this page You need to be a Service Desk Agent to access this page.

      Symptoms

      • You are restricted from viewing all Service Desk related project administration settings (Request types, Request security, Portal settings etc until Automation) despite you are an Agent and Admin who should be able to do so
      • In each Service Desk Project Permission Scheme, the Service Desk Agent project permission is missing.
      • Buttons for Queues, Customers, Reports etc are missing from the project navigation bar (left panel)
      • In JIRA Administration > Applications, the section for JIRA Service Desk's Configuration and Email requests is also missing
      • In atlassian-servicedesk.log or atlassian-jira.log while browsing the Service Desk project, error below is seen
        2016-08-31 19:03:16,901 JiraImportTaskExecutionThread-1 INFO admin 1136x5153x1 yt6xtk 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [servicedesk.bootstrap.lifecycle.PluginLifeCycle] Enabling ServiceDesk mail channels...
        2016-08-31 19:03:17,169 JiraImportTaskExecutionThread-1 ERROR admin 1136x5153x1 yt6xtk 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [atlassian.servicedesk.bootstrap.lifecycle] 
        java.lang.NullPointerException
        	at scala.Predef$.Long2long(Predef.scala:358)
        	at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSetting$.toModel(EmailChannelSetting.scala:30)
        	at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.com$atlassian$servicedesk$internal$feature$emailchannel$emailplatform$EmailChannelSettingManager$$toSettingModel(EmailChannelSettingManager.scala:124)
        	at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105)
        	at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105)
        	at scala.collection.immutable.List.map(List.scala:273)
        	at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.getEmailChannelSettings(EmailChannelSettingManager.scala:105)
        	at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.updateSDMailChannels(SDMailChannelInitializer.java:48)
        	at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.enableSDMailChannels(SDMailChannelInitializer.java:41)
        	at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runPluginStartupSideEffectsImpl(PluginLifeCycle.java:201)
        
        
        
        
        
        
        

      Steps to Reproduce the Problem

      1. Restore a backup from Cloud into JIRA 7.2.x and Service Desk 3.2.x.
      2. Navigate to an existing Service Desk project, or create a new Service Desk project.
      3. Click on the Project Settings button and click to view Request types or other Service Desk related project administration settings.

      Notes

      This same symptom can also be caused by JSD-4190, specifically if JIRA Service Desk cannot fully start up, certain functionality will work and others not work. It will appear as installed, but these same behaviours fail. Please verify if you're affected by JSD-4190 as it may be that bug instead.

      Workaround

      Upon restoring a Cloud backup, running the following SQL queries to delete the Cloud-related email channels will help recover the Agent permission:

      • For PostgreSQL:
        1. delete from "AO_54307E_EMAILCHANNELSETTING" where "ON_DEMAND" = 't';
        
        2. delete from "AO_2C4E5C_MAILHANDLER" where "MAIL_CHANNEL_ID" not in (select "ID" from "AO_54307E_EMAILCHANNELSETTING") or "HANDLER_TYPE" = 'CONNECTIONFAILUREHANDLER';
        
        3. delete from "AO_2C4E5C_MAILCHANNEL" where "MAIL_CONNECTION_ID" in (select "ID" from "AO_2C4E5C_MAILCONNECTION" where "EMAIL_ADDRESS" like '%atlassian.net');
        
        4. delete from "AO_2C4E5C_MAILCONNECTION" where "EMAIL_ADDRESS" like '%atlassian.net';
        
      • For other database types:
        1. delete from AO_54307E_EMAILCHANNELSETTING where ON_DEMAND = 1;
        
        2. delete from AO_2C4E5C_MAILHANDLER where MAIL_CHANNEL_ID not in (select ID from AO_54307E_EMAILCHANNELSETTING) or HANDLER_TYPE = 'CONNECTIONFAILUREHANDLER';
        
        3. delete from AO_2C4E5C_MAILCHANNEL where MAIL_CONNECTION_ID in (select ID from AO_2C4E5C_MAILCONNECTION where EMAIL_ADDRESS like '%atlassian.net');
        
        4. delete from AO_2C4E5C_MAILCONNECTION where EMAIL_ADDRESS like '%atlassian.net';
        

            [JSDSERVER-6538] Service Desk functionality fails with error 'You need to be a Service Desk Agent to access this page' after restoring cloud backup to server

            Try to do following:

            1. Create new Permission Scheme (apply only Administrators Role to all available permissions)
            2. Apply the brand new created Scheme to the Service Desk project
            3. You will be warned that scheme need to be fixed
            4. Accept the Fixing

            Voila!

             

            Flavio Beck added a comment - Try to do following: Create new Permission Scheme (apply only Administrators Role to all available permissions) Apply the brand new created Scheme to the Service Desk project You will be warned that scheme need to be fixed Accept the Fixing Voila!  

            This most definitely is not fixed in latest version (JIRA Service Desk 3.3.0/JIRA Core 7.3.0). Exactly same symptons happened after upgrading and it seems that only workaround provided in this issue fixes the problem.

            Mikko Aitta-aho added a comment - This most definitely is not fixed in latest version (JIRA Service Desk 3.3.0/JIRA Core 7.3.0). Exactly same symptons happened after upgrading and it seems that only workaround provided in this issue fixes the problem.

            Hi angela1360251464,

            Glad you've made this, thanks for sharing the workaround here so other people can apply before JSD-4227 is shipped . Speaking of the issue - fix for the issue is scheduled for Service Desk 3.2.6.

            –
            Cheers,
            Ignat.

            Ignat (Inactive) added a comment - Hi angela1360251464 , Glad you've made this, thanks for sharing the workaround here so other people can apply before  JSD-4227  is shipped . Speaking of the issue - fix for the issue is scheduled for Service Desk 3.2.6. – Cheers, Ignat.

            Wow, I finally got this issue resolved after 2+ months after reviewing several options throughout today.  I am so happy to say that we are finally running the latest version of JIRA Core and JIRA Service Desk.

            To anyone else who may still be having issues please try the fixes in the two (2) fixes noted below.  We were personally attempting to upgrade from JIRA Core 7.1.10 and could never make it to 7.2.0+ without issues until now.

            • https://jira.atlassian.com/browse/JSD-4227 
            • While reviewing the queries you attached to this ticket, I was able to see a few values as "null" when it should not be like this. To be honest with you, I think something went wrong with a few upgrade attempts and as a result, a few columns (as the mentioned ones) were not updated as they should be.

            Therefore and to try to fix this out, I'd like to manually update a few values in the tables AO_9B2E3B_RULESET_REVISION and AO_9B2E3B_RULE with the correct entries. So please proceed with the following:

              1. Run a backup of JIRA's DB and also a XML Backup as precaution.
              2. Stop JIRA
              3. Access your MySQL and run the following queries at JIRA's DB:
                • UPDATE AO_9B2E3B_RULESET_REVISION set IS_SYSTEM_RULE_SET = 0 where IS_SYSTEM_RULE_SET is null;
                • UPDATE AO_9B2E3B_RULE set ENABLED = 0 where "ENABLED" is null;
              1. Start the application again

            Strive for College added a comment - Wow, I finally got this issue resolved after 2+ months after reviewing several options throughout today.  I am so happy to say that we are finally running the latest version of JIRA Core and JIRA Service Desk. To anyone else who may still be having issues please try the fixes in the two (2) fixes noted below.  We were personally attempting to upgrade from JIRA Core 7.1.10 and could never make it to 7.2.0+ without issues until now. https://jira.atlassian.com/browse/JSD-4227   While reviewing the queries you attached to this ticket, I was able to see a few values as "null" when it should not be like this. To be honest with you, I think something went wrong with a few upgrade attempts and as a result, a few columns (as the mentioned ones) were not updated as they should be. Therefore and to try to fix this out, I'd like to manually update a few values in the tables AO_9B2E3B_RULESET_REVISION and AO_9B2E3B_RULE with the correct entries. So please proceed with the following: Run a backup of JIRA's DB and also a XML Backup as precaution. Stop JIRA Access your MySQL and run the following queries at JIRA's DB: UPDATE AO_9B2E3B_RULESET_REVISION set IS_SYSTEM_RULE_SET = 0 where IS_SYSTEM_RULE_SET is null ; UPDATE AO_9B2E3B_RULE set ENABLED = 0 where "ENABLED" is null ; Start the application again

            angela1360251464, I'll be watching the support request, thanks. Additionally I've asked Service Desk team to have a look.

            Ignat (Inactive) added a comment - angela1360251464 , I'll be watching the support request, thanks. Additionally I've asked Service Desk team to have a look.

            Thanks Ignat – we created a support request as advised.

            Please feel free to review our issue if you are interested – JSP-278169 

            Strive for College added a comment - Thanks Ignat – we created a support request as advised. Please feel free to review our issue if you are interested – JSP-278169 

            Hey angela1360251464,

            Can you please forward the problem you have to the http://support.atlassian.com for the support team to investigate your case and possibly provide a workaround for the problem? I'll be watching the issue and the support requests too to see if there are any action items needed from the Dev team.

            Sorry for the inconvenience.

            –
            Cheers,
            Ignat.

            Ignat (Inactive) added a comment - Hey angela1360251464 , Can you please forward the problem you have to the http://support.atlassian.com for the support team to investigate your case and possibly provide a workaround for the problem? I'll be watching the issue and the support requests too to see if there are any action items needed from the Dev team. Sorry for the inconvenience. – Cheers, Ignat.

            Ignat.... Spent all morning redoing this with the exact same results.... beginning to lose hope that this will ever be resolved. 

            Strive for College added a comment - Ignat.... Spent all morning redoing this with the exact same results.... beginning to lose hope that this will ever be resolved. 

            Hi everyone,

            JIRA 7.2.5 and JIRA Service Desk 3.2.5 application are released today. Both of the issues mentioned in the comment above should be now fixed.

            • Service Desk permissions lost when importing CloudData into Server
            • Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud

            Please let me know if you still experience any issues after upgrading.

            Thanks,
            Ignat
            JIRA Bugmaster.

            Ignat (Inactive) added a comment - Hi everyone, JIRA 7.2.5 and JIRA Service Desk 3.2.5 application are released today. Both of the issues mentioned in the comment above should be now fixed. Service Desk permissions lost when importing CloudData into Server Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud Please let me know if you still experience any issues after upgrading. Thanks, Ignat JIRA Bugmaster.

            Ignat (Inactive) added a comment - - edited

            Hi Everyone,

            We have identified number of issues why the import problem are not resolved for the Service Desk projects.

            Team has identified 2 separate issues:

            • Service Desk permissions lost when importing CloudData into Server
            • Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud JSD-4190

             

            Service Desk permissions lost when importing CloudData into Server

            This issue was planned to be shipped with 7.2.3 release and that's when issue got resolved. After number of issue comments I've reopened the issue. Root cause analysis identified that JIRA Service Desk 7.2.3 / Service Desk Application, in fact has, not shipped the code changes that addresses the fix.

            We have addressed this issue and upcoming JIRA Service Desk 7.2.5 and Service Desk application 3.2.5 will be shipping all the necessary changes.

             

            Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud

            This issue has been discovered later, and identified as a separate issue and tracked as JSD-4190.
            The fix for this is included in JIRA Service Desk 7.2.5 and Service Desk application 3.2.5

            Atlassian Support can provide a workaround for the case described in JSD-4190, please contact the team if upgrading or waiting for 7.2.5 is not an option. These requests can be raised at http://support.atlassian.com

             

            The release addressing both problems will be shipped soon, it may take us about 10-14 days to make the release available for download. These are approximate estimation on shipping the release, but not a commitment from our side. If we identify issues we will have to rebuild the version and move the release date.

             

            Cheers,
            Ignat
            JIRA Bugmaster.

            Ignat (Inactive) added a comment - - edited Hi Everyone, We have identified number of issues why the import problem are not resolved for the Service Desk projects. Team has identified 2 separate issues: Service Desk permissions lost when importing CloudData into Server Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud  JSD-4190   Service Desk permissions lost when importing CloudData into Server This issue was planned to be shipped with 7.2.3 release and that's when issue got resolved. After number of issue comments I've reopened the issue. Root cause analysis identified that JIRA Service Desk 7.2.3 / Service Desk Application, in fact has, not shipped the code changes that addresses the fix. We have addressed this issue and upcoming JIRA Service Desk 7.2.5 and Service Desk application 3.2.5 will be shipping all the necessary changes.   Service Desk throws NullPointer exception when projects with mail channels is imported from the Cloud This issue has been discovered later, and identified as a separate issue and tracked as  JSD-4190 . The fix for this is included in JIRA Service Desk 7.2.5 and Service Desk application 3.2.5 Atlassian Support can provide a workaround for the case described in JSD-4190 , please contact the team if upgrading or waiting for 7.2.5 is not an option. These requests can be raised at  http://support.atlassian.com   The release addressing both problems will be shipped soon, it may take us about 10-14 days to make the release available for download. These are approximate estimation on shipping the release, but not a commitment from our side. If we identify issues we will have to rebuild the version and move the release date.   Cheers, Ignat JIRA Bugmaster.

              Unassigned Unassigned
              michin Michelle Chin
              Affected customers:
              16 This affects my team
              Watchers:
              37 Start watching this issue

                Created:
                Updated:
                Resolved: