java.io.FileNotFoundException when loading server.xml

プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

要約

問題

Bitbucket Server fails to load the server.xml and the following appears in the catalina.out:

28-Jul-2016 19:00:00.000 SEVERE [main] com.atlassian.stash.internal.catalina.startup.Bootstrap.logError Copying fallback default-server.xml to shared home; no other server.xml file was found 28-Jul-2016 19:00:00.001 SEVERE [main] com.atlassian.stash.internal.catalina.startup.Bootstrap.logException Failed to copy /opt/atlassian/bitbucket/4.5.2/conf/.default-server.xml to /var/atlassian/application-data/bitbucket/shared/server.xml java.io.FileNotFoundException: /var/atlassian/application-data/bitbucket/shared/server.xml (Permission denied) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:270) at java.io.FileOutputStream.<init>(FileOutputStream.java:213) at java.io.FileOutputStream.<init>(FileOutputStream.java:162) at com.atlassian.stash.internal.catalina.startup.Bootstrap$ArgumentDecorator.copyFallbackServerXmlTo(Bootstrap.java:196) at com.atlassian.stash.internal.catalina.startup.Bootstrap$ArgumentDecorator.apply(Bootstrap.java:131) at com.atlassian.stash.internal.catalina.startup.Bootstrap.main(Bootstrap.java:79)

診断

診断ステップ

  • Check the permissions and ownership over the server.xml file by running:

    ls -l /var/atlassian/application-data/bitbucket/shared

原因

  • The ownership over the server.xml file isn't not properly set. In the case above, it was set as follows:

    -rw------- 1 atlbitbucket root 7662 Jul 28 12:00 server.xml

    The user is properly set as "atlbitbucket" as this is the user running the application, but it's related to the group "root".

ソリューション

ソリューション

  • Adjust the ownership over the server.xml file according to the user running the application, then restart Bitbucket Server:

    chown atlbitbucket:atlbitbucket server.xml

更新日時: September 26, 2025

さらにヘルプが必要ですか?

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