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

The Socket Timeout in General Configuration doesn't override the SAL timeout

      If JIRA takes more than the default timeout in SAL (10 seconds) then anything that uses the application link, such as the JIRA Issues Macro or the highlighting panel, will fail.

      Symptoms:
      The following appears in atlassian-confluence.log:

      java.net.SocketTimeoutException: Read timed out
      	at java.net.SocketInputStream.socketRead0(Native Method)
      	at java.net.SocketInputStream.read(SocketInputStream.java:152)
      	at java.net.SocketInputStream.read(SocketInputStream.java:122)
      	at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
      	at sun.security.ssl.InputRecord.read(InputRecord.java:480)
      	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
      	at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
      	at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
      	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      	at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
      	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
      	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
      	at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
      	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
      	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
      	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
      	at com.atlassian.confluence.util.http.httpclient.HttpClientHttpRetrievalService.get(HttpClientHttpRetrievalService.java:65)

      Steps to Reproduce:

      1. Start up JIRA from source in debug mode.
      2. Start up Confluence, and create an application link between the two instances
      3. Set the Socket Timeout in General Configuration to, for example, 20000 (20 seconds)
      4. Create a project and issue in JIRA
      5. Set a breakpoint in JIRA anywhere that's convenient and hit the breakpoint
      6. Create a new page in Confluence and open up the network tab of your Browser
      7. Create a JIRA Issues Macro in Confluence and search for the new project. This will timeout

      Expected Results
      The macro times out after 20 seconds, as specified in Confluence's Socket Timeout.

      Actual Results
      The macro times out after 10 seconds, the default set in com.atlassian.sal.core.net.SystemPropertiesConnectionConfig

      Workaround:

      Add the following to your system properties in bin/setenv.sh:

      CATALINA_OPTS="$CATALINA_OPTS -Dhttp.socketTimeout=<YOUR_NEW_TIMEOUT_IN_MILLISECONDS>"
      CATALINA_OPTS="$CATALINA_OPTS -Dhttp.connection.timeout=<YOUR_NEW_TIMEOUT_IN_MILLISECONDS>"

      For more information please see Configuring System Properties.

            [CONFSERVER-36316] The Socket Timeout in General Configuration doesn't override the SAL timeout

            sanna added a comment -

            The following workaround works perfectly!

            CATALINA_OPTS="$CATALINA_OPTS -Dplugin.jira-integration.remote.timeout.socket=YOUR_TIMEOUT_IN_MILLISECONDS"

            CONFSERVER-36335

            sanna added a comment - The following workaround works perfectly! CATALINA_OPTS="$CATALINA_OPTS -Dplugin.jira-integration.remote.timeout.socket=YOUR_TIMEOUT_IN_MILLISECONDS" CONFSERVER-36335

            sanna added a comment -

            I tried this workaround in Confluence 5.9.5 and  6.1.4, but it did not work....

            The macro times out after 10 seconds, not 20 seconds.

            I added this in my setenv.sh.

            --------------------------------------

            CATALINA_OPTS="-Dhttp.socketTimeout=20000 ${CATALINA_OPTS}"

             

            sanna added a comment - I tried this workaround in Confluence 5.9.5 and  6.1.4, but it did not work.... The macro times out after 10 seconds, not 20 seconds. I added this in my setenv.sh. -------------------------------------- CATALINA_OPTS="-Dhttp.socketTimeout=20000 ${CATALINA_OPTS}"  

            Hi artgrohe, this shouldn't be a problem in JIRA. If you're seeing the same stack trace, please raise a ticket at http://support.atlassian.com/ and we'll help you get down to the root cause of the issue.

            lachland (Inactive) added a comment - Hi artgrohe , this shouldn't be a problem in JIRA. If you're seeing the same stack trace, please raise a ticket at http://support.atlassian.com/ and we'll help you get down to the root cause of the issue.

            Arthur added a comment -

            Is this workaround also possible in JIRA ? Thanks

            Arthur added a comment - Is this workaround also possible in JIRA ? Thanks

              kmacleod Kenny MacLeod
              ldally lachland (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: