Bamboo Upgrade Fails on task 51306 due to empty administration.xml file

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

Problem

Write a brief step by step description of the symptoms of the problem including any errors, eg:

When upgrading Bamboo, you may see task 51306 fail with the following in the atlassian-bamboo.log:

1 2 3 4 5 6 7 8 9 2016-10-13 17:08:10,228 INFO [localhost-startStop-1] [AbstractUpgradeManager] ----------------------------------------------------------------------------------------------------------- 2016-10-13 17:08:10,229 INFO [localhost-startStop-1] [AbstractUpgradeManager] 51306 : Set 'WHITELIST' method for xStream serialization security configuration value in administration.xml 2016-10-13 17:08:10,229 INFO [localhost-startStop-1] [AbstractUpgradeManager] ----------------------------------------------------------------------------------------------------------- 2016-10-13 17:08:10,254 ERROR [localhost-startStop-1] [AbstractUpgradeManager] io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: Unexpected exception io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: Unexpected exception ... Caused by: java.lang.RuntimeException: Unexpected exception ... Caused by: org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.

Diagnosis

Diagnostic Steps

  • Verify the contents of BAMBOO_HOME/xml-data/configuration/administration.xml

    • If the file is empty, the steps in this article apply

Cause

This is caused by a blank BAMBOO_HOME/xml-data/configuration/administration.xml file.

Solution

Resolution

If you have a backup of your BAMBOO_HOME directory, please copy the xml-data/configuration/administration.xml file from there to your live BAMBOO_HOME.

If you do not, you can start a new installation of Bamboo, so that the Bamboo Home directory gets populated with the required files, and then copy that file over to the existing directory. This can be accomplished as follows:

  1. Create a new directory that will be the new Bamboo Home (NEW_BAMBOO_HOME)

  2. Update your BAMBOO_INSTALL/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties to point bamboo.home to NEW_BAMBOO_HOME

  3. Start Bamboo and complete the setup

  4. Copy the NEW_BAMBOO_HOME/xml-data/configuration/administration.xml to BAMBOO_HOME/xml-data/configuration/administration.xml

    • This file should be non-empty

  5. Stop Bamboo

  6. Update your BAMBOO_INSTALL/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties to point bamboo.home to BAMBOO_HOME

  7. Start Bamboo

The upgrade should now succeed as expected.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.