Bamboo: lock file [defaultdb.lck] is presumably locked by another process

Автор: | 04/17/2015
 

logo_bamboo_blueПри запуске Bamboo —  в логе появляется ошибка:

2015-03-19 15:55:01,052 WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] [BasicResourcePool] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6969e378 — 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:
java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@ea9c2fe1[file =/home/bamboo/bamboo_home/database/defaultdb.lck, exists=true, locked=false, valid=false, fl =nu
ll]: java.lang.Exception: checkHeartbeat(): lock file [/home/bamboo/bamboo_home/database/defaultdb.lck] is presumably locked by another process.
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

И:

2015-03-19 15:55:01,061 ERROR [localhost-startStop-1] [AbstractBootstrapUpgradeTask] Error getting database connection
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)

При открытии веб-интерфейса — в нём ошибка 500:

2015-03-19 15:55:19,537 ERROR [http-bio-8085-exec-7] [FiveOhOh] 500 Exception was thrown.
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Container is not setup

Проблема возникает из-за того, что имеется ещё один запущенный процесс Bamboo, например — не отработал shutdown, и процесс остался в системе.

Останавливаем текущий процесс:

$ ./atlassian-bamboo-5.7.2/bin/shutdown.sh

Ищем другие процессы Bamboo:

$ ps aux | grep bamboo
bamboo    7128  2.0 15.7 3128864 619516 pts/2  Sl   Mar18  32:01 /home/bamboo/java/bin/java -Djava.util.logging.config.file=/home/bamboo/atlassian-bamboo-5.7.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -XX:MaxPermSize=256m -Xms256m -Xmx384m -Djava.endorsed.dirs=/home/bamboo/atlassian-bamboo-5.7.2/endorsed -classpath /home/bamboo/atlassian-bamboo-5.7.2/bin/bootstrap.jar:/home/bamboo/atlassian-bamboo-5.7.2/bin/tomcat-juli.jar -Dcatalina.base=/home/bamboo/atlassian-bamboo-5.7.2 -Dcatalina.home=/home/bamboo/atlassian-bamboo-5.7.2 -Djava.io.tmpdir=/home/bamboo/atlassian-bamboo-5.7.2/temp org.apache.catalina.startup.Bootstrap start

Убиваем его:

$ kill 7128

Запускаем систему заново.

Готово.