Crowd Server Does Not Start - Could not acquire change log lock
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
Problem
Crowd Server does not start and the following error can be seen in the atlassian-crowd.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2020-08-27 22:15:50,436 localhost-startStop-1 INFO [liquibase] Waiting for changelog lock....
...
2020-08-27 22:20:50,501 localhost-startStop-1 ERROR [crowd.console.listener.StartupListener] Failed to initialise Crowd container
java.lang.RuntimeException: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by my.test-crowd-server (192.168.48.3) since 8/27/20 4:03 AM
at com.atlassian.crowd.util.persistence.hibernate.LiquibaseSchemaHelper.runLiquibaseUpdate(LiquibaseSchemaHelper.java:142)
at com.atlassian.crowd.util.persistence.hibernate.LiquibaseSchemaHelper.lambda$updateSchemaIfNeeded$1(LiquibaseSchemaHelper.java:80)
at com.atlassian.crowd.util.persistence.hibernate.LiquibaseSchemaHelper.withServiceRegistry(LiquibaseSchemaHelper.java:166)
at com.atlassian.crowd.util.persistence.hibernate.LiquibaseSchemaHelper.withServiceRegistry(LiquibaseSchemaHelper.java:152)
at com.atlassian.crowd.util.persistence.hibernate.LiquibaseSchemaHelper.updateSchemaIfNeeded(LiquibaseSchemaHelper.java:79)
at com.atlassian.crowd.console.listener.StartupListener.migrateAndUpgradeCrowd(StartupListener.java:193)
at com.atlassian.crowd.console.listener.StartupListener.contextInitialized(StartupListener.java:60)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by my.test-crowd-server (192.168.48.3) since 8/27/20 4:03 AM
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:190)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.Liquibase.update(Liquibase.java:192)
at com.atlassian.crowd.util.persistence.hibernate.LiquibaseSchemaHelper.runLiquibaseUpdate(LiquibaseSchemaHelper.java:137)
... 15 more
The following is also presented on the Crowd User Interface:

Diagnosis
Check for the above mentioned log errors in atlassian-crowd.log
as well as checking the above screen presented on Crowd.
Alternatively, check the database to see if the is locked whilst Crowd has been shut down:
Lock table is held by something (Bad)
1
2
3
4
5
6
7
8
9
-- POSTGRES
> select * from cwd_databasechangeloglock;
-- MySQL, MSSQL and Oracle
> select * from CWD_DATABASECHANGELOGLOCK;
id locked lockgranted lockedby
-- ------ ----------------------- ---------------------------------------
1 true 2020-08-27 04:03:41.451 my.test-crowd-server.com (192.168.48.3)
Lock table is not held by anything (Good)
1
2
3
4
5
6
7
8
9
-- POSTGRES
> select * from cwd_databasechangeloglock;
-- MySQL, MSSQL and Oracle
> select * from CWD_DATABASECHANGELOGLOCK;
id locked lockgranted lockedby
-- ------ ----------- --------
1 false (null) (null)
Cause
The cwd_databasechangeloglock
table has not been updated with the release lock information.
The likely cause of this is that the Crowd Server instance was forced to quit while it was trying to startup, with the consequence that the lock was not released. You should always wait for Crowd Server to start up sufficiently for it to provide error messages – never assume that it has hung and kill the process.
Solution
Resolution
Ensure that Crowd Server application is shutdown prior to running the below SQL queries to manually force unlock the cwd_databasechangeloglock
table.
Shutdown Crowd Server
Run the following SQL query in respect to your database engine:
Click here to expand for MySQL and SQL Server
1
UPDATE CWD_DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1;
Click here to expand for Oracle
1 2
UPDATE CWD_DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1; commit;
Click here to expand for PostgreSQL
1
update cwd_databasechangeloglock set locked='false', lockgranted=null, lockedby=null where id=1;
Start Crowd Server and the "Could not acquire change lock" error should no longer appear
Was this helpful?