Have you tried to drop it with sql query directly in your database?
DROP INDEX idx_users_token ON tc_users;
Did that but still getting this error:
traccar | Exception in thread "main" java.lang.RuntimeException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
traccar |
traccar | 1) [Guice/ErrorInCustomProvider]: LockException: DatabaseException: Expected single row from SelectFromDatabaseChangeLogLockStatement@149c3204 but got 0
traccar | at DatabaseModule.provideDataSource(DatabaseModule.java:46)
traccar | at DatabaseStorage.<init>(DatabaseStorage.java:48)
traccar | \_ for 2nd parameter
traccar | while locating DatabaseStorage
traccar | while locating Storage
traccar |
traccar | Learn more:
traccar | https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER
traccar |
traccar | 1 error
traccar |
traccar | ======================
traccar | Full classname legend:
traccar | ======================
traccar | DatabaseException: "liquibase.exception.DatabaseException"
traccar | DatabaseModule: "org.traccar.storage.DatabaseModule"
traccar | DatabaseStorage: "org.traccar.storage.DatabaseStorage"
traccar | LockException: "liquibase.exception.LockException"
traccar | SelectFromDatabaseChangeLogLockStatement: "liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement"
traccar | Storage: "org.traccar.storage.Storage"
traccar | ========================
traccar | End of classname legend:
traccar | ========================
traccar |
traccar | at org.traccar.Main.run(Main.java:154)
traccar | at org.traccar.Main.main(Main.java:114)
traccar | Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
I'm guessing 149c3204
is the deploymentID or something but since I've deleted two rows from DATABASECHANGELOG
its not matching. Do you know where this 149c3204
is coming from? I dont see anything else in traccar's data directory.
Why did you remove stuff from DATABASECHANGELOG
? You should just reset the lock status.
That was my bad, I wrongly assumed when downgrading to 5 from 5.3 that it'll need those rows removed.
I think the easiest way is to restore the database from a backup and run the upgrade again.
I'll give it a try, thank you
Alright, so I restored db from backup, and then tried running 5.3. As expected, it was complaining about idx_users_token
which I dropped manually using DROP INDEX idx_users_token ON tc_users;
But its still failing to start with following error:
2022-08-15 22:11:48 INFO: Operating system name: Linux version: 5.15.41-0-virt architecture: amd64
2022-08-15 22:11:48 INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Alpine version: 11.0.16+8-alpine-r0
2022-08-15 22:11:48 INFO: Memory limit heap: 494mb non-heap: 0mb
2022-08-15 22:11:48 INFO: Character encoding: UTF-8 charset: UTF-8
2022-08-15 22:11:48 INFO: Version: 5.3
2022-08-15 22:11:48 INFO: Starting server...
2022-08-15 22:11:48 INFO: HikariPool-1 - Starting...
2022-08-15 22:11:49 INFO: HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: 2633325e-42e5-4ac5-8c37-7ecb9fc91979
2022-08-15 22:11:49 INFO: HikariPool-1 - Start completed.
2022-08-15 22:11:50 INFO: Set default schema name to dbo
2022-08-15 22:11:50 INFO: Clearing database change log checksums
2022-08-15 22:11:50 INFO: Successfully acquired change log lock
2022-08-15 22:11:51 INFO: Successfully released change log lock
2022-08-15 22:11:51 INFO: Successfully acquired change log lock
2022-08-15 22:11:51 INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2022-08-15 22:11:51 INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2022-08-15 22:11:54 INFO: Reading from DATABASECHANGELOG
2022-08-15 22:11:55 INFO: Reading from DATABASECHANGELOG
2022-08-15 22:11:55 INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2022-08-15 22:11:55 INFO: Successfully released change log lock
The service keeps restarting with following in logs:
2022-08-15 22:16:46 INFO: jetty-10.0.7; built: 2021-10-06T19:34:02.766Z; git: da8a4553af9dd84080931fa0f8c678cd2d60f3d9; jvm 11.0.16+8-alpine-r0
2022-08-15 22:16:48 INFO: Started o.t.w.@52cb52bd{/,null,AVAILABLE}
2022-08-15 22:16:49 INFO: Session workerName=node0
2022-08-15 22:16:58 INFO: Operating system name: Linux version: 5.15.41-0-virt architecture: amd64
2022-08-15 22:16:58 INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Alpine version: 11.0.16+8-alpine-r0
2022-08-15 22:16:58 INFO: Memory limit heap: 494mb non-heap: 0mb
2022-08-15 22:16:58 INFO: Character encoding: UTF-8 charset: UTF-8
2022-08-15 22:16:58 INFO: Version: 5.3
2022-08-15 22:16:58 INFO: Starting server...
2022-08-15 22:16:59 INFO: HikariPool-1 - Starting...
2022-08-15 22:17:00 INFO: HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: 9f5370f6-11bc-4e3e-aa27-c54516e43266
2022-08-15 22:17:00 INFO: HikariPool-1 - Start completed.
2022-08-15 22:17:01 INFO: Set default schema name to dbo
2022-08-15 22:17:01 INFO: Clearing database change log checksums
2022-08-15 22:17:01 INFO: Successfully acquired change log lock
2022-08-15 22:17:02 INFO: Successfully released change log lock
2022-08-15 22:17:02 INFO: Successfully acquired change log lock
2022-08-15 22:17:02 INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2022-08-15 22:17:02 INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2022-08-15 22:17:05 INFO: Reading from DATABASECHANGELOG
2022-08-15 22:17:06 INFO: Reading from DATABASECHANGELOG
2022-08-15 22:17:06 INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2022-08-15 22:17:06 INFO: Successfully released change log lock
2022-08-15 22:17:24 INFO: jetty-10.0.7; built: 2021-10-06T19:34:02.766Z; git: da8a4553af9dd84080931fa0f8c678cd2d60f3d9; jvm 11.0.16+8-alpine-r0
2022-08-15 22:17:25 INFO: Started o.t.w.@63553e9f{/,null,AVAILABLE}
2022-08-15 22:17:26 INFO: Session workerName=node0
2022-08-15 22:17:36 INFO: Operating system name: Linux version: 5.15.41-0-virt architecture: amd64
2022-08-15 22:17:36 INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Alpine version: 11.0.16+8-alpine-r0
2022-08-15 22:17:36 INFO: Memory limit heap: 494mb non-heap: 0mb
and in docker-compose up i eventually get traccar exited with code 137
. Also no log is printed on stdout of docker-compose up
the above is from traccar-server.log
file.
I'm not a docker-compose expert, but doesn't error code 137 mean out of memory?
Ahh, yeah I had memory limit of 150MiB in my docker compose. Upped it to 500MiB and its golden now.
Thank you very much for your help and quick responses, appreciate it :)
Just noticed that with v5.3 RAM usage is slightly more than double (~ 380-400MiB) compared to v5 (~ 130-150MiB). Is this somewhat expected?
As long as it doesn't leak memory, it shouldn't be double.
I'll keep an eye out and see. Thank you for quick response
Hey all,
I've traccar running in docker and its using MSSQL as DB. Tried to perform the update from 5.0 to 5.3 as server failed to start with following error:
Digging into it I came across this and it looks like this was already merged into 5.3.
As a desperate attempt to get my server back online, I tried reverting back to 5.2 then 5.1 and then finally to 5.0. When trying 5.0 image I was getting following error:
Thought this might be due to downgrade to 5.2 and 5.1 that I attempted so I removed last two rows from
DATABASECHANGELOG
that were about 5.2 and 5.1. I'm still getting:Can anyone please guide me on how to fix this. Thank you