Tuples must be non-null after upgrading Bitbucket Server

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

問題

After upgrading to Bitbucket Server 4.11+, the application fails to start and the following message appears in the web UI:

The database, as currently configured, is not accessible. 
tuples must be non-null


The following appears in atlassian-bitbucket.log:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.hikari.ExtendedHikariDataSource]: Factory method 'create' threw exception; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: tuples must be non-null
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	... 5 common frames omitted
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: tuples must be non-null
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:516) ~[HikariCP-2.4.7.jar:na]
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:118) ~[HikariCP-2.4.7.jar:na]
	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:71) ~[HikariCP-2.4.7.jar:na]
	at com.atlassian.stash.internal.hikari.ExtendedHikariDataSource.<init>(ExtendedHikariDataSource.java:49) ~[bitbucket-dao-impl-4.12.0.jar:na]
	at com.atlassian.stash.internal.hikari.HikariDataSourceFactory.create(HikariDataSourceFactory.java:70) ~[bitbucket-dao-impl-4.12.0.jar:na]
	... 5 common frames omitted
Caused by: java.lang.NullPointerException: tuples must be non-null
	at org.postgresql.jdbc.PgResultSet.<init>(PgResultSet.java:147) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgStatement.createResultSet(PgStatement.java:163) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgStatement$StatementResultHandler.handleResultRows(PgStatement.java:213) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2037) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:305) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:291) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:269) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgConnection.execSQLUpdate(PgConnection.java:480) ~[postgresql-9.4.1211.jar:9.4.1211]
	at org.postgresql.jdbc.PgConnection.getTransactionIsolation(PgConnection.java:850) ~[postgresql-9.4.1211.jar:9.4.1211]
	at com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:392) ~[HikariCP-2.4.7.jar:na]
	at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:350) ~[HikariCP-2.4.7.jar:na]
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:321) ~[HikariCP-2.4.7.jar:na]
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506) ~[HikariCP-2.4.7.jar:na]
	... 9 common frames omitted

診断

環境

  • Bitbucket Server 4.11 以上
  • Postgres DB provided by EnterpriseDB

原因

In Bitbucket Server 4.11 the Postgres JDBC driver was upgraded to 9.4.1211, this triggers a bug in Postgres DB provided by EnterpriseDB and prevents Bitbucket Server from setting the isolation level. This bug is being tracked with the EnterpriseDB and Postgres teams at https://github.com/pgjdbc/pgjdbc/issues/667.

回避策

Version 9.4.1209 of the Postgres JDBC driver does not trigger this bug, as a workaround the previous version of the driver can be used.

  1. Bitbucket Server を停止します。
  2. Remove the postgresql-9.4.1211.jar from <Bitbucket 4.12 Install>/lib
  3. Copy the postgresql-9.4.*.jar from the lib directory of your previous installation of Bitbucket Server into <Bitbucket 4.12 Install>/lib
  4. Bitbucket Server を開始します。

ソリューション

A fix from EnterpriseDB is not yet available, updates should be available at https://github.com/pgjdbc/pgjdbc/issues/667.

最終更新日 2017 年 1 月 19 日

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

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