Enable AJP Support in Bamboo 2.0 and above.

Still need help?

The Atlassian Community is here for you.

Ask the community

In order to run Bamboo behind a proxy or load balancer on a mod_jk connection an AJP connector must be added.

If you don't use the AJP connector you may see "Failed to login trusted application: jira:xxxx due to bad URL signature" errors.

Get bamboo to use jetty.xml

Follow the instructions given here: Getting Bamboo to use the jetty.xml file

Resolution for Bamboo versions using Jetty 7.6.2 and above (Bamboo 4.1+).

To use AJP with either mod_jk or mod_proxy_ajp, Jetty needs to be configured with an AJP13 connector. This can configured by adding etc/jetty-ajp.xml to the command line. Alternately you can edit jetty.xml file from Bamboo distribution and uncomment the AJP connector section at the end of the file. You will therefore have to use the  jetty-ajp-7.6.2.v20120308.jar attached to this ticket

Enable the AJP connector

Resolution for Bamboo versions using Jetty 7.2.1 and above (Bamboo 3.0+).

To use AJP with either mod_jk or mod_proxy_ajp, Jetty needs to be configured with an AJP13 connector. This can configured by adding etc/jetty-ajp.xml to the command line. Alternately you can edit jetty.xml file from Bamboo distribution and uncomment the AJP connector section at the end of the file. Although Bamboo 3.0 and 3.0.1 come with Jetty AJP connector jar, it's buggy and you have to use this Jetty AJP connector modified by Atlassian.

Resolution for Bamboo versions using Jetty 6 and above.

To use AJP with either mod_jk or mod_proxy_ajp, Jetty needs to be configured with an AJP13 connector. This can configured by adding etc/jetty-ajp.xml to the command line. Alternately you can edit existing jetty.xml file with:

jetty.xml
    <Call name="addConnector">
        <Arg>
            <New class="org.eclipse.jetty.ajp.Ajp13SocketConnector">
                <Set name="port">8009</Set>
            </New>
        </Arg>
    </Call>

If you are getting the ClassNotFoundException for org.mortbay.http.ajp.AJP13Listener then this is due to newer versions of jetty not being shipped with the AJP Jar. Please review the current recommendation for jetty .

Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: org.mortbay.http.ajp.AJP13Listener
Add the missing jar

The Ajp13SocketConnector class is not distributed with Jetty 6 and above - in order to provide it, you have to use jetty-ajp-6.1.15.jar attached to this page. This jar file has been modified by Atlassian to correct a bug present in Jetty 6 versions prior to 6.1.26. Note: using a standard jar file from Jetty distribution will cause artifact transfer failures in Bamboo.

If your version of Jetty is newer than 6.1.25, you should use the "jetty-ajp-x.x.x.jar" where x.x.x is the version of jetty that ships with your Bamboo version. The current jetty version is part of jetty*.jar(s) in <bamboo-install>/webapp/WEB-INF/lib.

Resolution for Bamboo versions using Jetty 5 and below

Get bamboo to use jetty.xml

Follow the instructions given here: Getting Bamboo to use the jetty.xml file

Enable the AJP connector

To use AJP with either mod_jk or mod_proxy_ajp, Jetty needs to be configured with an AJP13 connector. This can configured by adding etc/jetty-ajp.xml to the command line. Alternately you can edit existing jetty.xml file with:

jetty.xml
<Call name="addConnector">
  <Arg>
    <New class="org.mortbay.jetty.ajp.Ajp13SocketConnector">
      <Set name="port">8009</Set>
    </New>
  </Arg>
</Call>

Configuring mod_proxy_ajp on Apache Server

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

# always keep the host header
ProxyPreserveHost On

# map to cluster
ProxyPass /bamboo balancer://my_cluster/bamboo stickysession=JSESSIONID nofailover=On


# define the balancer, with http and/ or ajp connections
<Proxy balancer://my_cluster>
    BalancerMember ajp://IP_ADDRESS:PORT
</Proxy>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Nov 29, 2016

Was this helpful?

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