Stash Does Not Start - Could not acquire change log lock

その他

このページの内容

お困りですか?

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

コミュニティに質問

問題

Stash does not start and the following error can be seen in the atlassian-stash.log:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by fe80:0:0:0:a00:27ff:fe6a:c787%2 (fe80:0:0:0:a00:27ff:fe6a:c787%2) since 12/6/12 2:08 PM

原因

The DATABASECHANGELOGLOCK table has not been updated with the release lock information.

The likely cause of this is that the Stash instance was forced to quit while it was trying to migrate the database schema after an upgrade, with the consequence that the lock was not released. You should always wait for Stash to start up sufficiently for it to provide error messages if there are schema migration problems – never assume that it has hung and kill the process.

Another possible cause of not releasing the lock is that Stash was forced to quit while performing automatic application setup.

ソリューション

Stash needs an exclusive lock on the DATABASECHANGELOGLOCK table in order to start so take care to disconnect / close the tool used to update the database. If you do not do this you may experience Stash hanging on start up with no errors in the logs and no response from the web server.

MySQL、SQL Server、Oralce 用は、ここをクリックして展開してください。
 UPDATE DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1;
PostgreSQL 用は、ここをクリックして展開してください。
 UPDATE databasechangeloglock SET LOCKED=false, LOCKGRANTED=null, LOCKEDBY=null where ID=1;
Click here to expand for HSQLDB

About Production Environments

We don't recommend the usage of HSQL for production environments. Please refer to Connecting Stash to an external database for a proper production environment deployment.

1- Shutdown Stash

2- Open your <STASH_HOME>/data/db.script and look for a string like:

INSERT INTO DATABASECHANGELOGLOCK VALUES(1,TRUE,'2012-06-12 14:08:00.982000','fe80:0:0:0:a00:27ff:fe6a:c787%2 (fe80:0:0:0:a00:27ff:fe6a:c787%2)')

And substitute it by the one below:

INSERT INTO DATABASECHANGELOGLOCK VALUES(1,FALSE, NULL,NULL )

3- Restart Stash

最終更新日 2016 年 7 月 26 日

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

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