So in traccar.xml, it lists:
<entry key="database.url">jdbc:h2:./data/database</entry>
and in default.xml, I have the following:
<entry key="database.ignoreUnkown">true</entry>
<entry key="database.generateQueries">true</entry>
<entry key="database.changelog">./schema/changelog-master.xml</entry>
<entry key="database.loginUser">SELECT * FROM users WHERE email = :email</entry>
<entry key="database.selectPositions">SELECT * FROM positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime</entry>
etc.
using the "jdbc:h2:./data/database" path, running the query in the box on H2 Console gives me:
update groups set groupid = null where id = groupid;
Table "GROUPS" not found; SQL statement:
update groups set groupid = null where id = groupid [42102-195] 42S02/42102 (Help)
I can expose this temporarily if someone would like to take a look and provide the URL.
Have you updated path in the URL? Path ./data/database
is relative to Traccar folder. If you are using some other folder obviously you need to update it.
Outside of default, I have not changed anything. What that URL path still apply?
I feel like you have no idea what I'm talking about. How are you connecting to the database? What's the current folder for the process that you are using to connect?
You mean via the terminal when I startup H2 Console?
/home/ubuntu/h2console/h2/bin$ java -jar h2*.jar
That gave me the console pop-up in a web browser.
Am I completely off the mark for what you're asking?
So your current folder is /home/ubuntu/h2console/h2/bin
which is obviously different from Traccar folder /opt/traccar
. You either need to use full path or change your folder to match Traccar.
okay, so I moved the h2.jar file to /opt/traccar and started it back up, lots more info now.
after running the query I get:
update groups set groupid = null where id = groupid;
Update count: 1
ran /opt/traccar/bin$ ./startDaemon.sh and voila, I have a working server again.
Apologize for my lack of knowledge on databases, but hopefully this might help someone else going forward.
Thanks for your patience!
Database URL is in Traccar config.