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

            Artur Moura (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 837060 ]
            goose (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 783337 ]
            Yann made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 726584 ]
            Julien Rey made changes -
            Description Original: h3. Issue Summary

            When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.
            h3. Steps to Reproduce
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.
            h3. 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 -
            {code:java}
             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)
            {code}
            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:
            {code:java}
            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)
            ...{code}

            h3. Impact of this bug:

            For now, there are 2 known symptoms caused by this bug:
            - When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
            !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!
            - The error *There was a problem completing the current request* is thrown when trying to select a space while configuring the knowledge base space in a JSM project
             !OtherSymptom.png|thumbnail!

            h3. 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).
            New: h3. Issue Summary

            When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.
            h3. Steps to Reproduce
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.
            h3. 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 -
            {code:java}
             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)
            {code}
            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:
            {code:java}
            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)
            ...{code}

            h3. Impact of this bug:

            For now, there are 2 known symptoms caused by this bug:
            - When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
            !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!
            -- More information in the KB article https://confluence.atlassian.com/jirakb/the-related-knowledge-base-articles-panel-shows-a-red-exclamation-mark-without-any-error-1206550574.html
            - The error *There was a problem completing the current request* is thrown when trying to select a space while configuring the knowledge base space in a JSM project
             !OtherSymptom.png|thumbnail!
            -- More information in the KB article https://confluence.atlassian.com/jirakb/error-when-trying-to-configure-a-knowledge-base-in-a-service-management-project-1085200961.html

            h3. 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).
            Julien Rey made changes -
            Description Original: h3. Issue Summary

            When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.
            h3. Steps to Reproduce
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.
            h3. 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 -
            {code:java}
             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)
            {code}
            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:
            {code:java}
            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)
            ...{code}

            h3. Impact of this bug:

            For now, there are 2 known symptoms caused by this bug:
            - When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
            !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!
            - The error *There was a problem completing the current request* is thrown when trying to select a space while configuring the knowledge base space in a JSM project


            h3. 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).
            New: h3. Issue Summary

            When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.
            h3. Steps to Reproduce
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.
            h3. 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 -
            {code:java}
             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)
            {code}
            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:
            {code:java}
            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)
            ...{code}

            h3. Impact of this bug:

            For now, there are 2 known symptoms caused by this bug:
            - When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
            !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!
            - The error *There was a problem completing the current request* is thrown when trying to select a space while configuring the knowledge base space in a JSM project
             !OtherSymptom.png|thumbnail!

            h3. 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).
            Julien Rey made changes -
            Attachment New: OtherSymptom.png [ 432939 ]
            Julien Rey made changes -
            Description Original: h3. Issue Summary

            When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.
            h3. Steps to Reproduce
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.
            h3. 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 -
            {code:java}
             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)
            {code}
            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:
            {code:java}
            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)
            ...{code}
            h3. Other symptom

            When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
            !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!
            h3. 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).
            New: h3. Issue Summary

            When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.
            h3. Steps to Reproduce
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.
            h3. 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 -
            {code:java}
             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)
            {code}
            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:
            {code:java}
            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)
            ...{code}

            h3. Impact of this bug:

            For now, there are 2 known symptoms caused by this bug:
            - When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
            !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!
            - The error *There was a problem completing the current request* is thrown when trying to select a space while configuring the knowledge base space in a JSM project


            h3. 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).
            Julien Rey made changes -
            Description Original: h3. Issue Summary

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

            h3. Steps to Reproduce
             
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.

            h3. 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, we should see several {{StackOverFlowError}} while Jira is running some REST APIs against Confluence Cloud. Like the sample below -
             {code}
             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)
            {code}

            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.

            h3. Other symptom

            When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
             !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!

            h3. 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).
            New: h3. Issue Summary

            When we have a Jira OnPrem connected to Confluence Cloud, it might be possible the connection stops working.
            h3. Steps to Reproduce
             # Have Jira OnPrem integrating with Confluence Cloud using the [Confluence Cloud Integration|https://confluence.atlassian.com/servicemanagementserver050/set-up-a-knowledge-base-with-confluence-cloud-1142253068.html], which was working previously.
             # Try to link a KB to an Issue
             # We should see a message like this "There was a problem completing the current request" from the UI.

            h3. Expected Results

            The KB should be linked with no issues.
            h3. 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 -
            {code:java}
             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)
            {code}
            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:
            {code:java}
            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)
            ...{code}
            h3. Other symptom

            When opening any ticket from the Service Management project in the Agent view, the *Related Knowledge base articles* will show a red exclamation mark without any error:
            !Screenshot 2022-12-22 141611_2022-12-22T20_28_05.310Z.png|thumbnail!
            h3. 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).
            Yann made changes -
            Assignee New: Yann [ a64d184ae8e6 ]
            Bartosz Ornatowski made changes -
            Fix Version/s Original: 5.4.3 [ 104315 ]
            Fix Version/s New: 5.4.2 [ 104393 ]

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

                Created:
                Updated:
                Resolved: