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

HttpMethod leaking across HttpRetrievalService calls

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Symptoms

      1. Server is configured with a proxy for some hosts but not all. Confluence OnDemand uses this configuration.
      2. Users sometimes cannot load remotely hosted content, either in the editor or when viewing pages. Affected content can include (but is not limited to) Skitch or OpenPhoto embedded images, gadgets or CloudApp shared files.
      3. Remote services are available.
      4. Confluence logs contain warning messages from org.apache.commons.httpclient.SimpleHttpConnectionManager
        SimpleHttpConnectionManager being used incorrectly.  Be sure that HttpMethod.releaseConnection() is always called and that only one thread and/or method is using this connection manager at a time.
        

      Details

      HttpClient requires that its HttpMethod.releaseConnection method is called for it to fully release the underlying resources and allow configuring correct proxy settings for the connection. When the caller fails to call this method, the message above is logged by org.apache.commons.httpclient.SimpleHttpConnectionManager at the WARN level.

      Confluence wraps this in a HttpResponse.finish method, but this is only ever called in the BaseHttpRetrievalMacro. Every other use of HttpResponse in Confluence (core or bundled plugin) needs to release its connection correctly too.

      Workaround

      A possible workaround for this issue is to use the same proxy settings for all remote connections, and to ensure that the proxy can reach all required hosts.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              richatkins Richard Atkins
              Votes:
              9 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: