Traccar won't start - "ERROR: Main method error - Could not acquire change log lock. Currently locked by localhost (127.0.0.1)"

spel3 months ago

Hello,

I have this Error. I tried

update DATABASECHANGELOGLOCK
set locked = 0

But it doesn't work. How can I continue searching? The database is H2. Traccar Version 4.14.
I would also like to update and reinstall if necessary, but first back up the config and devices. Device data is not important.

translated into English:

root@user:/opt/traccar/data# java -cp /home/user/h2/bin/h2-2.2.220.jar org.h2.tools.Shell -url jdbc:h2:/opt/traccar/data/database -user sa -password ""
Error: Main class org.h2.tools.Shell could not be found or loaded
Cause: java.lang.ClassNotFoundException: org.h2.tools.Shell
root@user:/opt/traccar/data#

Thanks!

Anton Tananaev3 months ago

It doesn't seem like you're using the right version of the H2 driver. You have to use the one that comes with Traccar.

spel3 months ago

Hello, thanks for the quick reply. I'm thinking about a new installation. I probably won't be able to get the device data because I can't access the database.
Or is there any help on how I can install the correct driver.
I use a hosted server, so some update probably broke something.

Thanks

Anton Tananaev3 months ago

You don't need to install anything. The driver comes with Traccar.

spel3 months ago

Okay. But the server was running for a long time. Suddenly it stopped. Hence the question.

Anton Tananaev3 months ago

What you're trying to do is the correct steps, but you need to connect to the database.

spel3 months ago

"but you need to connect to the database" - OK. Thank you very much for the quick help - unfortunately I don't know what to do next. An internet search didn't help me.

Anton Tananaev3 months ago
  1. First find the right driver in Traccar folder.
  2. Read H2 documentation on how to connect to the database.
  3. Execute the query from your original post.
spel3 months ago

Ok, according to my research this should be the correct H2 driver for version 4.14:

root@user:/opt/traccar# ls lib | grep h2
h2-1.4.200.jar