Bitbucket is not picking the correct schema to use for the database

お困りですか?

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

コミュニティに質問

問題

Bitbucket won't start with the following errors:

2014-02-07 12:09:03,235 ERROR [http-bio-7990-exec-7] 728x27x0 jv58e6 10.123.16.180 "POST /setup HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager Failed to obtain session factory
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in CROWD.CWD_APP_DIR_MAPPING
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1129) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE]
	at com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:337) [stash-service-impl-2.10.1.jar:na]
	at com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:158) [stash-service-impl-2.10.1.jar:na] 
2016-08-22 18:45:45,259 ERROR [spring-startup]  c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_active in SCHEMA.CWD_APPLICATION

PostgreSQL database

ERROR [http-nio-7990-exec-1] <session_id> <user> <ip> "POST /setup HTTP/1.1" c.a.s.i.web.setup.SetupController An unexpected exception occurred while setting up the database
  java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: relation "databasechangeloglock" already exists
...
Caused by: org.postgresql.util.PSQLException: ERROR: relation "databasechangeloglock" already exists


原因

 Bitbucket server does not currently support the ability to specify which schema to use, therefore Bitbucket is not picking the correct schema to use for the database.

  BSERV-3540 - Getting issue details... STATUS

ソリューション

ソリューション 1

  1. Set the Bitbucket server user to only have permission to the Bitbucket server schema.
  2. Restart Bitbucket server and update the bitbucket.properties file with any database configuration changes.

ソリューション 2

  1. Move the Bitbucket server schema to it's own database.
  2. Restart Bitbucket server and update the bitbucket.properties file with any database configuration changes.

 

最終更新日 2017 年 5 月 26 日

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

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