liquibase.exception.LockException: Could not acquire change log lock

Nebula4 years ago

Howdy folks,
Last weekend I was doing the regular maintenance and upgraded my traccar docker container. Simple docker-compose pull and then I forgot to do docker-compose down instead if docker-compose up directly. And that caused a lock on my H2 database. I looked through forums and github issues, came across this . I was able to connect to H2 shell using: java -cp lib/h2*.jar org.h2.tools.Shell -url "jdbc:h2:/opt/traccar/data/db_old/database.mv.db" -driver org.h2.Driver -user sa but once inside SQL, the next step fails with following error:

sql> SELECT * FROM PUBLIC.DATABASECHANGELOGLOCK;
Error: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "DATABASECHANGELOGLOCK" not found; SQL statement:
SELECT * FROM PUBLIC.DATABASECHANGELOGLOCK [42102-200]

To dig out further I used this docker image to browse through the DB from traccar but DATABASECHANGELOGLOCK is no where to be seen. See screenshot here
Any help will be appreciated, thanks. And I think I'll move my DB to proper SQL server maybe MySQL or MSSQL after this.

Anton Tananaev4 years ago

This doesn't look like Traccar database.

Nebula4 years ago

This is database.mv.db file from /data folder, the only other file I see there is database.trace.db which is a lot smaller in size. Also I tried to database.mv.db file in VS Code and seems like it is the correct database file, the location points from traccar are there.
These are the settings Im using in H2 explorer to connect to db, maybe something wrong there.

Anyways I have a day old backup that I can restore from but wanted to resolve this in case I hit it again in future. Thanks for your help.