Bamboo upgrade fails with "FileAlreadyExistsException" for bamboo-mail.cfg.xml

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: 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 は除く

要約

While upgrading Bamboo to version 8 or newer, the startup fails and shows "Bamboo bootstrap failed: Failed to run pre-bootstrap upgrade tasks". Upon checking the <bamboo-home>/logs/atlassian-bamboo.log file, the following error is present:

java.nio.file.FileAlreadyExistsException: <bamboo-home>/bamboo/shared/configuration/bamboo-mail.cfg.xml

環境

Observed while upgrading Bamboo 7.x or older to any 8.x version or newer.

診断

The following error messages can be found in the <bamboo-home>/logs/atlassian-bamboo.log file:

2022-06-25 11:40:34,110 ERROR [localhost-startStop-1] [AbstractUpgradeManager] java.nio.file.FileAlreadyExistsException: <bamboo-home>/bamboo/shared/configuration/bamboo-mail.cfg.xml
java.nio.file.FileAlreadyExistsException: <bamboo-home>/bamboo/shared/configuration/bamboo-mail.cfg.xml
        at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:429) ~[?:1.8.0_292]
        at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) ~[?:1.8.0_292]
        at java.nio.file.Files.move(Files.java:1395) ~[?:1.8.0_292]
        at com.atlassian.bamboo.upgrade.tasks.v8_0.UpgradeTask70302ReorganiseHomeDirectory.doUpgrade(UpgradeTask70302ReorganiseHomeDirectory.java:53) ~[atlassian-bamboo-web-9.0.1.jar:?]
        at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:230) ~[atlassian-bamboo-upgrader-9.0.1.jar:?]
        at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.doUpgrade(BootstrapUpgradeManagerImpl.java:75) ~[atlassian-bamboo-upgrader-9.0.1.jar:?]
        at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:385) ~[atlassian-bamboo-web-9.0.1.jar:?]
        at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:74) ~[atlassian-config-1.1.3.jar:?] 
[...]
2022-11-10 15:03:54,678 FATAL [main] [DefaultBootstrapManager] Pre-bootstrap upgrade tasks failed
com.atlassian.upgrade.UpgradeException: Pre-bootstrap upgrade tasks failed: [Task for build 70302 failed with exception: <bamboo-home>/shared/configuration/bamboo-mail.cfg.xml]
        at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:387) ~[atlassian-bamboo-web-9.0.1.jar:?]
[...]  

原因

Bamboo version 8 introduced changes to the home directory structure to accommodate the Data Center needs, and there are upgrade tasks that perform these migrations and adjustments. One of the upgrade tasks moves the bamboo-mail.cfg.xml file, which contains Bamboo's mail configuration, from the legacy location into the new folder structure.

This error can happen if, somehow, the file already exists in the new location. This could happen from a failed previous upgrade attempt that wasn't fully rolled back, or if that file was manually added to the new location.

ソリューション

  1. Compare the two bamboo-mail.cfg.xml files to determine which one is valid:
    1. <bamboo-home>/shared/configuration/bamboo-mail.cfg.xml
    2. <bamboo-home>/bamboo-mail.cfg.xml
  2. If they are the same, move <bamboo-home>/shared/configuration/bamboo-mail.cfg.xml out to a temporary directory.
  3. If they are not the same, determine which one contains valid content (according to your Mail configuration) and move it to <bamboo-home>, leaving the <bamboo-home>/shared/configuration/ without any bamboo-mail.cfg.xml file.
  4. Bamboo を再起動します。

最終更新日 2023 年 8 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.