GOCD server Db issue

Skip to first unread message

Vijayakumaran A.

Apr 25, 2024, 7:22:30 AMApr 25
to go-cd
HI Team,

When we restarting gocd server we have below error please advice us. We use h2db.

2024-04-25 16:22:33,896 INFO  [WrapperJarAppMain] Jetty9Server:199 - Configuring Jetty using /etc/go/jetty.xml
2024-04-25 16:22:33,958 WARN  [WrapperJarAppMain] Server:357 - ErrorPageMapper not supported for Server level Error Handling
2024-04-25 16:22:34,088 WARN  [WrapperJarAppMain] AbstractHandler:96 - No Server set for ResourceHandler@5904a259{STOPPED}
2024-04-25 16:22:40,659 WARN  [WrapperJarAppMain] ConnectionManager:117 - The file /etc/go/db.properties specified by `go.db.config` does not exist.
2024-04-25 16:22:41,319 INFO  [WrapperJarAppMain] DatabaseMigrator:40 - Upgrading database, this might take a while depending on the size of the database.
2024-04-25 16:22:41,320 INFO  [WrapperJarAppMain] DatabaseMigrator:49 - ************************************************************************
2024-04-25 16:22:41,320 INFO  [WrapperJarAppMain] DatabaseMigrator:49 - WARNING: Shutting down your server at this point will lead to a database corruption. Please wait until the database upgrade completes.
2024-04-25 16:22:41,320 INFO  [WrapperJarAppMain] DatabaseMigrator:49 - ************************************************************************
2024-04-25 16:27:42,107 ERROR [WrapperJarAppMain] DatabaseMigrator:65 - Unable to create database upgrade script for database. The problem was: Could not acquire change log lock.  Currently locked by ( since 4/25/24, 12:19 PM
liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ( since 4/25/24, 12:19 PM

Chad Wilson

Apr 25, 2024, 8:33:28 AMApr 25
to go...@googlegroups.com
You may have killed GoCD while it was starting up? If you are sure that you do not have multiple processes accessing the same database at the same time and it is still stuck, you will have to try manually clearing the lock. Backup your database file before doing this.

Need to connect to the database and use this to clear the lock. You'll have to do so using something like is done here but instead of running an export/import to recreate the DB you just want to

1) backup the cruise.mv.db file (!!!!)
2) find the h2-1.4.200.jar file
3) create clear-liquibase-lock.sql with UPDATE DATABASECHANGELOGLOCK SET LOCKED=0
4) run something like this on the main DB file java -cp h2-1.4.200.jar org.h2.tools.RunScript -url jdbc:h2:./cruise -user sa -script clear-liquibase-lock.sql


You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/a1b7a304-1559-441e-b002-b385ae93184en%40googlegroups.com.
Reply all
Reply to author
Message has been deleted
0 new messages