Bamboo Data Center fails to upgrade with a 'FileNotFoundException'

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

When upgrading Bamboo 7.0.x to a newer version, Bamboo fails to upgrade on task 'UpgradeTask70302ReorganiseHomeDirectory' with a FileNotFoundException while attempting to move contents from <bamboo-home>/artifacts to <bamboo-home>/shared/artifacts. This issue is due to the presence of symbolic links in the artifacts folder that Bamboo cannot interpret.

Environment

The solution has been validated in Bamboo 7.0 but may be applicable to other versions.

Diagnosis

The following error message can be seen in the <bamboo-home>/logs/atlassian-bamboo.log indicating that the artifacts cannot be moved to the <bamboo-home>/shared/artifacts folder. 

INFO [localhost-startStop-1] [UpgradeTask70302ReorganiseHomeDirectory] Moving /bamboo-home/artifacts to /bamboo-home/shared/artifacts...
ERROR [localhost-startStop-1] [AbstractUpgradeManager] java.io.FileNotFoundException: Source '/bamboo-home/artifacts/TTT-DC' does not exist
java.io.FileNotFoundException: Source '/bamboo-home/artifacts/TTT-DC' does not exist
    at org.apache.commons.io.FileUtils.validateMoveParameters(FileUtils.java:3124)
	at org.apache.commons.io.FileUtils.moveToDirectory(FileUtils.java:2359)
	at com.atlassian.bamboo.util.BambooFileUtils.moveDirectoryContentToDirectory(BambooFileUtils.java:380)

Cause

The error is caused by symbolic links within the <bamboo-home>/artifacts directory. Bamboo's upgrade process cannot properly handle these symlinks, leading to the FileNotFoundException.

Solution

  1. Validate and Remove Symbolic Links: Identify and remove all symbolic links by running the ls -lart command in the <bamboo-home>/artifacts directory.

    ls -lart /bamboo-home/artifacts
  2. Manually Move Content: Alternatively, manually move all contents from /bamboo-home/artifacts to /bamboo-home/shared/artifacts.



Last modified on Aug 21, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.