How to troubleshoot Bamboo connectivity issues with Databases

お困りですか?

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

コミュニティに質問

 

プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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

*Fisheye および Crucible は除く

要約

The purpose of this article is to provide steps to troubleshoot Bamboo connectivity issues with Databases. To confirm that Bamboo is not able to connect to the Database below exception messages can be seen in <bamboo-home>logs>atlassian-bamboo.log file.

ERROR [main] [HikariPool] HikariPool-1 - Exception during pool initialization.
org.postgresql.util.PSQLException: Connection to 192.168.130.95:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:342) ~[postgresql-42.6.0.jar:42.6.0]

環境

The Solution has been tested on Bamboo 9.2.11 and PostgreSQL DB, but the troubleshooting steps can be used for other DB types as well by making applicable changes. 

ソリューション

Investigate if the DB is running properly or not 

1) The first step is to make sure whether the Database Instance is running properly or not, for PostgreSQL DB running on Unix OS this can be checked by running the below command.

ps -f -u postgres 

2) Second step is to check if port 5432 is open on the server where your instance of Postgres is running? Please run the below command, replace 5432 with any other manually configured port if any.

netstat -ltnp|grep 5432| grep LISTEN

3) Third step is to check if you are able to manually connect to PostgresDB from the Linux command line? Please run the following command.

psql -U <username> -p 5432 <db-name>

If the result of above 3 commands are okay, it means the DB is running properly and is ready to accept connections from Bamboo server, next step is to investigate if the DB Server is reachable properly from Bamboo server. 

Investigate if the DB server is reachable from Bamboo server

1) The first step is to validate if the DB server is reachable from Bamboo server, this can be checked by running the below command.

ping 192.168.130.95 or ping dbserverhostname

Here 192.168.130.95 or dbserverhostname can be used, please ping whatever is coming in the log files as error or the configuration inside <bamboo-home>bamboo.cfg.xml file under hibernate.connection.url property.

5432 is the default port used to connect to PostgreSQL, if a different port is used please replace that in the below command 

2) If the ping is working fine next step is to check if Bamboo server is able to connect the DB server port by running the below command.

telnet 192.168.130.95:5432 

or

curl -v 192.168.130.95:5432 

3) If the hostname is used inside <bamboo-home>bamboo.cfg.xml file under hibernate.connection.url property make sure Bamboo server is able to resolve the hostname this can be checked by running the below command

nslookup dbserverhostname


With the above testing you should be able to identify where is the connection being broken and fix it accordingly. 


最終更新日 2024 年 5 月 8 日

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

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