Confluence is Not Accessible with a 502 Proxy Error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Confluence starts up fine but is not accessible via the browser. It redirects you to a "502 Proxy Error" message.

The following IndexOutOfBoundsException appears in catalina.out:

SEVERE: Error, processing connection
java.lang.IndexOutOfBoundsException
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:628)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:585)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:693)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Unknown Source)
Sep 19, 2013 4:03:46 AM org.apache.jk.common.MsgAjp processHeader
SEVERE: BAD packet signature 18245
Sep 19, 2013 4:03:46 AM org.apache.jk.common.ChannelSocket processConnection
SEVERE: Error, processing connection
java.lang.IndexOutOfBoundsException
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:628)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:585)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:693)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Unknown Source)

Diagnosis

The error is clearly related to Apache Tomcat, and there is some sort of proxy in place. To quickly isolate the proxy as the source of the problem, replace the existing <confluence-install-directory>/conf/server.xml with a default server.xml file (with default settings), and access Confluence via localhost:<port>, as configured in the default server.xml. If you can access Confluence successfully after this change, the proxy is indeed the culprit. Identify what proxy is in use (e.g. mod_proxy or mod_jk).

Cause

There is an AJP connection set in server.xml even though the server is actually configured to use mod_proxy. This causes a conflict. 

Resolution

  • Remove the AJP connection in server.xml
  • Restart Confluence

(info) It's always good to check on the proxy setting in <confluence-install>/conf/server.xml and compare it against the recommendations is Using Apache with mod_proxy. From here, you'd be able to isolate which line of configuration is causing the problem.

Last modified on Dec 18, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.