Attempting to start Bamboo 4.4.3 using Jetty results in a NullPointerException

I followed the instructions on this page:

https://confluence.atlassian.com/display/BAMKB/Running+bamboo+behind+apache+httpd+proxy

To get bamboo proxied behind an Apache HTTP server. I've configured Apache appropriately (using it for our other servers) and modified the conf/wrapper.conf file as specified in the documentation. However, when I call wrapper/start-bamboo start and tail the logs/bamboo.log, I get the following exception:

Loading jetty configuration file 'webapp/WEB-INF/classes/jetty.xml' from the classpath as it does not exist on the filesystem.

java.lang.NullPointerException

at org.eclipse.jetty.xml.XmlConfiguration.(XmlConfiguration.java:150)

at com.atlassian.bamboo.server.Server.(Server.java:141)

at com.atlassian.bamboo.server.Server.main(Server.java:46)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)

at java.lang.Thread.run(Unknown Source)

If I change everything back to standard, it works as expected.

1 answer

Check the wrapper.conf file again. I use the same setup (reverse proxying with apache httpd) and my wrapper.conf has these initial lines :

wrapper.app.parameter.1=com.atlassian.bamboo.server.Server
wrapper.app.parameter.2=webapp/WEB-INF/classes/jetty.xml


#wrapper.app.parameter.2=8085
#wrapper.app.parameter.3=../webapp
#wrapper.app.parameter.4=/

Make sure you comment out any other lines with "wrapper.app.parameter.X" as the PORT, PATH to the jetty file, and Content (/) get specified in the jetty XML. and that the numbers are sequential.

Additionally double-check how you're starting Bamboo. If you use the bamboo.sh file, has it been modified or moved? It includes the wrapper.conf info using :

$BAMBOO_INSTALL/conf/wrapper.conf

where $BAMBOO_INSTALL is built from the directory of the bamboo.sh file. If that file gets moved it can affect the env variables and the wrapper.conf file cannot resolve the path webapp/WEB-INF/classes/jetty.xml correctly.

If your HTTPD reverse proxy is serving via SSL, in the jetty.xml make sure to include :

<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Set name="host"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.port" default="8443"/></Set>
<Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/ssl/keystore</Set>
<Set name="Password">KEYPASS</Set>
<Set name="KeyPassword">KEYPASS</Set>
</New>
</Arg>
</Call>

You need to generate a local keystore on the bamboo server and inside it generate a self-signed cert with password and keypass that you define in the addConnector XML above (replace KEYPASS with your password). This seems to be necessary to get Bamboo to listen on an SSL port and then you update your Apache conf file to proxypass an dproxypassreverse to the bamboo SSL port. If you don't then Bamboo breaks in the SSL reverse proxy config.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,583 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you