Bamboo fails to import with EOF exception

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

Bamboo import fails with EOF exception when importing a Bamboo export file.

E.g.

  • Export from old Bamboo Server

  • Import to new Bamboo Server

The following error log appears during the import process on the new server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677) at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2119) at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2025) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1117) at org.codehaus.staxmate.in.SMHierarchicCursor.getNext(SMHierarchicCursor.java:72) at org.codehaus.staxmate.in.SMInputCursor.advance(SMInputCursor.java:1631) at com.atlassian.bamboo.migration.XmlMigrator.importFromFile(XmlMigrator.java:375) at com.atlassian.bamboo.migration.XmlMigrator.importXmlData(XmlMigrator.java:339) at com.atlassian.bamboo.migration.XmlMigrator.loadXmlData(XmlMigrator.java:326) at com.atlassian.bamboo.migration.XmlMigrator.access$100(XmlMigrator.java:76) at com.atlassian.bamboo.migration.XmlMigrator$2.doInHibernate(XmlMigrator.java:190) ... 194 more 2018-03-15 23:31:21,192 ERROR [http-nio-8085-exec-1] [SetupImportDataAction] Failed to import java.lang.Exception: Import has failed. Errors encountered while importing. This Bamboo instance may be corrupt.

Diagnosis

Environment

  • Bamboo Server

Diagnostic Steps

  • Create an export from an older Bamboo Server

    • Follow the logs under $BAMBOO_HOME/logs/atlassian-bamboo.log  and monitor the export. Look for any exceptions during the export process such as an OutOfMemoryError.

  • Attempt to import on a new Bamboo Server 

Cause

The exception is caused due to a problem generating the export file from your source instance. The export file may not have completed properly and have missing data.

Workaround

  • Create a new export from the original server

  • Ensure the server has enough memory to complete the export 

    • This can be viewed under the $BAMBOO_HOME/logs/atlassian-bamboo.log on the Bamboo instance that generated the export. If there is not enough memory there will be an OutOfMemoryError  visible in the logging.

  • Ensure there are no empty XML files in the export zip file after exporting

Solution

  • Check your memory usage on the origin Bamboo instance. Make increases in small increments such as an additional 256mb  or 512mb  to the JVM settings in your $BAMBOO_INSTALL/bin/setenv.sh  script. Details found Configuring your system properties.

  • Ensure there is enough free disk space available on the machine to complete the export which will vary in size depending on which elements you've chosen to include.

  • Perform a fresh export and monitor the application logs under $BAMBOO_HOME/logs/atlassian-bamboo.log looking for a successful export job message without any exception such as:

    1 2 3 4 2018-03-18 23:09:05,006 INFO [http-nio-8085-exec-11] [XmlMigrator] Finished updating zip 2018-03-18 23:09:05,006 INFO [http-nio-8085-exec-11] [XmlMigrator] Ensuring the the file has been unmounted 2018-03-18 23:09:05,008 INFO [http-nio-8085-exec-11] [XmlMigrator] Unmounted /var/atlassian/application-data/bamboo/exports/<export_file_from_ui>.zip 2018-03-18 23:09:05,008 INFO [http-nio-8085-exec-11] [XmlMigrator] Export completed. 1.293 s

Updated on March 11, 2025

Still need help?

The Atlassian Community is here for you.