Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-46514

Confluence returns "Unable to retrieve JIRA metadata" message in linked JIRA issues dialog when accessed by unlicensed users

      Summary

      When unlicensed user from JIRA Service Desk access a space in Confluence and click on the JIRA issue dialog, Confluence returns the following error :

      atlassian-confluence.log throws the following error :

      2017-02-02 15:49:26,956 ERROR [JIRAMetadataPlugin:thread-9] [metadata.jira.helper.JiraMetadataErrorHelper] printError Unknown error encountered while retrieving JIRA metadata. Please check the logs.
      – referer: https://jirajirajira/display/keykey/pagepagepage | url: /rest/jira-metadata/1.0/metadata | traceId: 39600d04bc6dc2d0 | userName: useruseruser
      org.apache.http.client.ClientProtocolException
      at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
      at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:95)
      at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:131)
      at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.executeAndReturn(ApplicationLinkRequestAdaptor.java:53)
      at com.atlassian.applinks.oauth.auth.OAuthApplinksReturningResponseHandler.handle(OAuthApplinksReturningResponseHandler.java:45)
      at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:134)
      at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:96)
      at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:131)
      at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.executeAndReturn(ApplicationLinkRequestAdaptor.java:53)
      at com.atlassian.applinks.oauth.auth.OAuthRequest.executeAndReturn(OAuthRequest.java:84)
      at com.atlassian.applinks.core.auth.AbstractApplicationLinkRequest.execute(AbstractApplicationLinkRequest.java:114)
      at com.atlassian.confluence.plugins.metadata.jira.service.JiraIssuesMetadataDelegate.getGroups(JiraIssuesMetadataDelegate.java:58)
      at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$2.call(SingleAppLinkMetadataHelper.java:133)
      at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$2.call(SingleAppLinkMetadataHelper.java:125)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.http.ProtocolException: Target host is not specified
      at org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:70)
      at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:124)
      at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:183)
      ... 18 more
      
      Expected Behavior

      JIRA issue dialog returns warning message stating the user doesn't have permission, try log in with another user.

      Actual Behavior

      The error wasn't handled gracefully and no indication of the root cause was shown in the logs or UI.

            [CONFSERVER-46514] Confluence returns "Unable to retrieve JIRA metadata" message in linked JIRA issues dialog when accessed by unlicensed users

            Hi

            JIRA is 7.3.0 on both servers.

            Confluence is 6.0.3.

            It will be tricky to go backwards and test with Confluence 5.10.8? This is our production system and I don't think we can downgrade the software after it has been upgraded?

             

            Philip Colmer added a comment - Hi JIRA is 7.3.0 on both servers. Confluence is 6.0.3. It will be tricky to go backwards and test with Confluence 5.10.8? This is our production system and I don't think we can downgrade the software after it has been upgraded?  

            Minh Tran added a comment -

            jwaihou Can you let me know the JIRA, SD versions that you used to test the bug?
            Are you able to test it with previous Confluence version 5.10.8?

            Minh Tran added a comment - jwaihou Can you let me know the JIRA, SD versions that you used to test the bug? Are you able to test it with previous Confluence version 5.10.8?

            Just for clarification, the reason why JIRA links is showing both a link and an error is because we have two JIRA instances connected to Confluence. One has the exact same user database as our Confluence instance and that is the one that is returning the valid link.

            The other JIRA instance is running Service Desk and, as a result, only SD agents have licences on that instance. So, the vast majority of Confluence users on our setup will be seeing this error.

             

            Philip Colmer added a comment - Just for clarification, the reason why JIRA links is showing both a link and an error is because we have two JIRA instances connected to Confluence. One has the exact same user database as our Confluence instance and that is the one that is returning the valid link. The other JIRA instance is running Service Desk and, as a result, only SD agents have licences on that instance. So, the vast majority of Confluence users on our setup will be seeing this error.  

              Unassigned Unassigned
              jwaihou Jonathan Soo
              Affected customers:
              14 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated: