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

There was a problem completing the current request error message while linking a KB from Jira OnPrem to Confluence Cloud

      Issue Summary

      When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.

      Steps to Reproduce

      1. Have Jira OnPrem integrating with Confluence Cloud using the Confluence Cloud Integration, which was working previously.
      2. Try to link a KB to an Issue
      3. We should see a message like this "There was a problem completing the current request" from the UI.

      Expected Results

      The KB should be linked with no issues.

      Actual Results

      A warning message ("There was a problem completing the current request) shows on the UI, and the task will not be completed.

      From the logs in the atlassian-jira.log file, we should see several StackOverFlowError while Jira is running some REST APIs against Confluence Cloud. Like the sample below -

       2022-09-22 21:53:53,308+0000 http-nio-8080-exec-26465 url: /rest/servicedesk/1/servicedesk/HD/kb/CONFLUENCE_CLOUD/space; user: xxxxx ERROR xxxxx 1313x14878224x1 c17btf xx.xx.xx.xx /rest/servicedesk/1/servicedesk/HD/kb/CONFLUENCE_CLOUD/space [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
      java.lang.StackOverflowError
          at java.base/java.lang.String.toLowerCase(Unknown Source)
          at java.base/java.lang.String.toLowerCase(Unknown Source)
          at com.sun.jersey.core.util.StringIgnoreCaseKeyComparator.hash(StringIgnoreCaseKeyComparator.java:53)
          at com.sun.jersey.core.util.StringIgnoreCaseKeyComparator.hash(StringIgnoreCaseKeyComparator.java:48)
          at com.sun.jersey.core.util.KeyComparatorHashMap.keyComparatorHash(KeyComparatorHashMap.java:294)
          at com.sun.jersey.core.util.KeyComparatorHashMap.containsKey(KeyComparatorHashMap.java:359)
          at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:102)
          at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
      

      We may look at the HTTPBasicAuthFilter class.

      This issue is caused by a BUG, where the filter allowing to authenticate the request made to Confluence Cloud is added at each request. This is causing a stack overflow when an exception occurs on Confluence side but also eats up a lot of memory unnecessarily even when the request works fine.

      Note that the following error might be thrown in the atlassian-servicedesk.log file:

      2023-01-03 15:24:24,861-0500 https-jsse-nio-8443-exec-68 url:/issues/rest/se...les/<ISSUE_KEY> username:someuser ERROR <SANITIZED DATA> /rest/servicedesk/knowledgebase/latest/articles/<ISSUE_KEY> [confluenceknowledgebase.cloud.client.ConfluenceCloudClientImpl] Failed to call Confluence Cloud API for path /rest/api/search
      com.sun.jersey.api.client.ClientHandlerException: java.lang.IllegalStateException: Stream handler unavailable due to: null
      	at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
      	at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
      	at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
      	at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
      	at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
      	at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
      	at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
      ...

      Impact of this bug:

      For now, there are 2 known symptoms caused by this bug:

      Workaround

      Currently, the only workaround is to restart the Jira Service to clean the service object, because the filter is added on every request after the service is constructed (on startup).

            [JSDSERVER-12210] There was a problem completing the current request error message while linking a KB from Jira OnPrem to Confluence Cloud

            Hi b0e65afe5d42

            Thank you for your feedback - just letting you know we consider this a high priority issue and plan to resolve as soon as possible.
            The fix for this one is already in progress, Im just working with the team on next steps, testing etc.

            Should have news for you shortly, thanks again,
            Alex Cooksey
            JSM DC

            Alex Cooksey added a comment - Hi b0e65afe5d42 Thank you for your feedback - just letting you know we consider this a high priority issue and plan to resolve as soon as possible. The fix for this one is already in progress, Im just working with the team on next steps, testing etc. Should have news for you shortly, thanks again, Alex Cooksey JSM DC

            +1 SDS-66050

            This keeps breaking on our clustered instance which is a poor user experience as you end up with a big red error on each ticket if you're balanced to the broken node.
            No fix other than to continually restart the instance which is nothing short of a joke if you consider this in any way an "enterprise application"

            Mark Benson added a comment - +1 SDS-66050 This keeps breaking on our clustered instance which is a poor user experience as you end up with a big red error on each ticket if you're balanced to the broken node. No fix other than to continually restart the instance which is nothing short of a joke if you consider this in any way an "enterprise application"

              a64d184ae8e6 Yann
              8c7f0d7281aa Artur Moura (Inactive)
              Affected customers:
              2 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: