Bamboo startup fails with error "Could not create connection to database server." (using MySQL)

お困りですか?

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

コミュニティに質問

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

要約

When Bamboo starts (or it's being configured for the first time), it fails to connect to the MySQL Database.

環境

Any supported Bamboo version connected to MySQL.

診断

In the logs (<bamboo_home>/logs/atlassian-bamboo.log) the following error can be found:

atlassian-bamboo.log
2021-10-30 11:13:59,169 WARN [C3P0PooledConnectionPoolManager[identityToken->1bqox56ak1lq1hm5p7wori|4f17a326]-HelperThread-#2] [BasicResourcePool] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@a2a7aa6 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
       at sun.reflect.GeneratedConstructorAccessor27.newInstance(Unknown Source)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
       at com.mysql.jdbc.Util.getInstance(Util.java:408)
(...)
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
       at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171)
       at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:106)
       at sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)
       at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:394)
       at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:373)
       at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:149)
       ... 23 more

原因

An SSL handshake problem happens when SSL is forced in one of the ends, in an environment where SSL was not configured.

ソリューション

A way to avoid this problem is by telling Bamboo to not use SSL explicitly. To do this:

  1. Stop Bamboo.
  2. Edit the <bamboo_home>/bamboo.cfg.xml file and look for the following line:

    <property name="hibernate.connection.url">YOUR_DB_URL</property> 
  3. Add the "useSSL=false" flag so it looks like this:

    <property name="hibernate.connection.url">YOUR_DB_URL?useSSL=false</property> 

    (info) If you have more than one parameter, separate them with a semicolon.

  4. Start Bamboo again.

Last modified on Mar 14, 2023

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

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