Bamboo fails to start with an error 'Content is not allowed in prolog'
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Summary
The core configurations for the Bamboo server application and Bamboo Agent are loaded from the files bamboo.cfg.xml and bamboo-agent.cfg.xml, respectively.
Diagnosis
The below error is thrown when Bamboo server starts and it fails to start:
Bamboo Server error log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2012-11-30 18:24:51,447 FATAL [main] [BootstrapLoaderListener] An error was encountered while bootstrapping Bamboo (see below):
Unable to bootstrap Bamboo: Failed to parse config file: Error on line 1of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
java.lang.IllegalStateException: Unable to bootstrap Bamboo: Failed to parse config file: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:63)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:233)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1222)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:261)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at com.atlassian.bamboo.server.Server.main(Server.java:75)
2012-11-30 18:24:51,453 INFO [main] [UpgradeLauncher] UpgradeLauncher not performed since the application has not been setup yet.
2012-11-30 18:24:51,537 INFO [main] [DefaultConfiguration] Loading global messages from com.atlassian.bamboo.ww2.BambooActionSupport
2012-11-30 18:24:51,537 INFO [main] [DefaultConfiguration] Loading global messages from help-paths
Bamboo Agent startup fails with an error below;
Agent Error log
1
2
INFO | jvm 20 | 2023/08/01 13:10:40 | [Fatal Error] bamboo-agent.cfg.xml:1:1: Content is not allowed in prolog.
Cause
Some random char codes are saved in one of the config files or a corrupted configuration file can cause this error.
Solution
Bamboo server
Check <BAMBOO-HOME>/bamboo.cfg.xml
config file and remove all random char codes that appear there. If not sure what should be in that file, install a fresh empty Bamboo instance and compare the config files.
Bamboo Remote agent
Rename or move the existing <BAMBOO-AGENT-HOME>/
bamboo-agent.cfg.xml
and then start the remote agent.
If you require assistance or facing further issues please contact our friendly support.
Was this helpful?