Bamboo fails to import with EOF exception
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
要約
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.
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.
診断
環境
- 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 anOutOfMemoryError.
- Follow the logs under
- Attempt to import on a new Bamboo Server
原因
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.
回避策
- 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 anOutOfMemoryError
visible in the logging.
- This can be viewed under the
- Ensure there are no empty XML files in the export zip file after exporting
ソリューション
- Check your memory usage on the origin Bamboo instance. Make increases in small increments such as an additional
256mb
or512mb
to the JVM settings in your$BAMBOO_INSTALL/bin/setenv.sh
script. Details found here. - 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: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