Traccar server not working after update from 4.2 to 5.5 (Windows)

Michael2 years ago

Hi.

My Traccar server is not working after update from 4.2 to 5.5 (Windows).

Error: ERROR: Main method error - The file ./schema/changelog-master.xml was not found in the configured search path:
    - C:\WINDOWS\system32

Here is the full log:

2022-12-29 15:10:22  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2022-12-29 15:10:22  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 17.0.4+8
2022-12-29 15:10:22  INFO: Memory limit heap: 1024mb non-heap: 0mb
2022-12-29 15:10:22  INFO: Character encoding: Cp1252 charset: windows-1252
2022-12-29 15:10:22  INFO: Version: 5.5
2022-12-29 15:10:22  INFO: Starting server...
2022-12-29 15:10:23  INFO: HikariPool-1 - Starting...
2022-12-29 15:10:23  INFO: HikariPool-1 - Added connection conn0: url=jdbc:h2:./data/database user=SA
2022-12-29 15:10:23  INFO: HikariPool-1 - Start completed.
2022-12-29 15:10:24  INFO: Set default schema name to PUBLIC
2022-12-29 15:10:24  INFO: Clearing database change log checksums
2022-12-29 15:10:24  INFO: Successfully acquired change log lock
2022-12-29 15:10:24  INFO: Creating database history table with name: PUBLIC.DATABASECHANGELOG
2022-12-29 15:10:24  INFO: Successfully released change log lock
2022-12-29 15:10:24  INFO: Successfully acquired change log lock
2022-12-29 15:10:24  INFO: Successfully released change log lock
2022-12-29 15:10:24 ERROR: Main method error - The file ./schema/changelog-master.xml was not found in the configured search path:
    - C:\WINDOWS\system32
More locations can be added with the 'searchPath' parameter. - ChangeLogParseException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < Main:126 < ...)
2022-12-29 15:10:24  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@4397ad89 threw the following exception - The file ./schema/changelog-master.xml was not found in the configured search path:
    - C:\WINDOWS\system32
More locations can be added with the 'searchPath' parameter. - ChangeLogParseException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < Main:126 < ...)

Looks like something to do with Liquibase.

I rolled back the virtual machine now, but I like to use Traccar 5.5.

Thanks,
Michael

Anton Tananaev2 years ago

We always test our releases on Windows, so I'm not sure why it wouldn't work.

Michael2 years ago

Thanks Anton.

Looks like I need to add the path to the changelog-master.xml file, i.e. "C:\Program Files\Traccar\schema". But where to add the path?

On the other side I could deinstall Traccar server 4.2 and do a fresh install of 5.5. But I like to keep my devices setup in Traccar (nothing more is needed). How to migrate the devices from 4.2 to 5.5?

Michael

Anton Tananaev2 years ago
Michael2 years ago

Thanks Anton.

I installed now Traccar 5.5 on a new machine and it runs ok.

Then I stopped the services and copied database.mv and database.trace from version 4.2 to the new installation, but Traccar fails to start with my database from 4.2

Error:

2022-12-30 09:54:00 ERROR: HikariPool-1 - Exception during pool initialization. - The write format 1 is smaller than the supported format 2 [2.1.214/5] - MVStoreException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < Main:126 < ...)
2022-12-30 09:54:00 ERROR: Main method error - The write format 1 is smaller than the supported format 2 [2.1.214/5] - MVStoreException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < Main:126 < ...)
2022-12-30 09:54:00  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@4397ad89 threw the following exception - The write format 1 is smaller than the supported format 2 [2.1.214/5] - MVStoreException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < Main:126 < ...)

Full Log:

2022-12-30 09:40:33  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
...
2022-12-30 09:53:58  INFO: Version: 5.5
2022-12-30 09:53:58  INFO: Starting server...
2022-12-30 09:53:59  INFO: HikariPool-1 - Starting...
2022-12-30 09:54:00 ERROR: HikariPool-1 - Exception during pool initialization. - The write format 1 is smaller than the supported format 2 [2.1.214/5] - MVStoreException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < Main:126 < ...)
2022-12-30 09:54:00 ERROR: Main method error - The write format 1 is smaller than the supported format 2 [2.1.214/5] - MVStoreException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < Main:126 < ...)
2022-12-30 09:54:00  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@4397ad89 threw the following exception - The write format 1 is smaller than the supported format 2 [2.1.214/5] - MVStoreException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < Main:126 < ...)

Michael

Anton Tananaev2 years ago

We don't recommend using H2 database. That's the main problem here. They changed the format recently, so it's not backward compatible. There are some ways to migrate it, but I would strongly recommend migrating off H2 to something more reliable like MySQL before you lose all of your data.

Michael2 years ago

Anton,

thanks a lot for helping.

I run now a fresh installtion of Traccar 5.5 with mySQL. Do I have to take care about this warning?

 WARN: Due to mysql SQL limitations, setNullable will lose primary key/autoincrement/not null/comment settings explicitly redefined in the change. Use <sql> or <modifySql> to re-specify all configuration if this is the case

Thanks,
Michael

Anton Tananaev2 years ago

Are you still using H2 database?

Michael2 years ago

No, changed to a fresh empty mySQL DB

Anton Tananaev2 years ago

Which changelog is giving this warning?

Michael2 years ago

This is how it looks like (after line 2023-01-02 15:37:01 INFO: Reading from TRACCAR.DATABASECHANGELOG), but after a restart today this warning is not logged anymore.

2023-01-02 15:36:55  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2023-01-02 15:36:55  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 17.0.4+8
2023-01-02 15:36:55  INFO: Memory limit heap: 2048mb non-heap: 0mb
2023-01-02 15:36:55  INFO: Character encoding: Cp1252 charset: windows-1252
2023-01-02 15:36:55  INFO: Version: 5.5
2023-01-02 15:36:55  INFO: Starting server...
2023-01-02 15:36:56  INFO: HikariPool-1 - Starting...
2023-01-02 15:36:57  INFO: HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@3e936a94
2023-01-02 15:36:57  INFO: HikariPool-1 - Start completed.
2023-01-02 15:36:58  INFO: Clearing database change log checksums
2023-01-02 15:36:58  INFO: Successfully acquired change log lock
2023-01-02 15:36:58  INFO: Creating database history table with name: TRACCAR.DATABASECHANGELOG
2023-01-02 15:36:59  INFO: Successfully released change log lock
2023-01-02 15:36:59  INFO: Successfully acquired change log lock
2023-01-02 15:37:01  INFO: Reading from TRACCAR.DATABASECHANGELOG
2023-01-02 15:37:02  WARN: Due to mysql SQL limitations, setNullable will lose primary key/autoincrement/not null/comment settings explicitly redefined in the change. Use <sql> or <modifySql> to re-specify all configuration if this is the case
2023-01-02 15:37:02  WARN: Due to mysql SQL limitations, modifyDataType will lose primary key/autoincrement/not null/comment settings explicitly redefined in the change. Use <sql> or <modifySql> to re-specify all configuration if this is the case
2023-01-02 15:37:02  WARN: Due to mysql SQL limitations, addDefaultValue will lose primary key/autoincrement/not null/comment settings explicitly redefined in the change. Use <sql> or <modifySql> to re-specify all configuration if this is the case
2023-01-02 15:37:02  INFO: Table tc_attributes created
2023-01-02 15:37:02  INFO: Table tc_calendars created
2023-01-02 15:37:02  INFO: Table tc_commands created
2023-01-02 15:37:02  INFO: Table tc_device_attribute created
...
2023-01-02 15:37:10  INFO: Column tc_orders.toaddresstmp renamed to toaddress
2023-01-02 15:37:10  INFO: Column tc_orders.fromaddresstmp renamed to fromaddress
2023-01-02 15:37:10  INFO: ChangeSet changelog-5.0::changelog-5.0::author ran successfully in 304ms
2023-01-02 15:37:10  INFO: Index idx_drivers_uniqueid created
2023-01-02 15:37:11  INFO: Index idx_devices_uniqueid created
2023-01-02 15:37:11  INFO: Index idx_users_email created
2023-01-02 15:37:11  INFO: Index idx_users_login created
2023-01-02 15:37:11  INFO: Index idx_users_token created
2023-01-02 15:37:11  INFO: Columns overlayurl(VARCHAR(512)) added to tc_servers
2023-01-02 15:37:11  INFO: ChangeSet changelog-5.1::changelog-5.1::author ran successfully in 649ms
2023-01-02 15:37:11  INFO: Columns status(CHAR(8)) added to tc_devices
2023-01-02 15:37:11  INFO: Columns geofenceids(VARCHAR(128)) added to tc_devices
2023-01-02 15:37:11  INFO: ChangeSet changelog-5.2::changelog-5.2::author ran successfully in 192ms
2023-01-02 15:37:11  INFO: Columns fixedemail(BOOLEAN) added to tc_servers
2023-01-02 15:37:11  INFO: Columns fixedemail(BOOLEAN) added to tc_users
2023-01-02 15:37:12  INFO: Columns expirationtime(TIMESTAMP) added to tc_devices
2023-01-02 15:37:12  INFO: Table tc_keystore created
2023-01-02 15:37:12  INFO: Index idx_users_token dropped from table tc_users
2023-01-02 15:37:12  INFO: Column tc_users.token dropped
2023-01-02 15:37:12  INFO: ChangeSet changelog-5.3::changelog-5.3::author ran successfully in 539ms
2023-01-02 15:37:12  INFO: Columns motionstate(BOOLEAN),motiontime(TIMESTAMP),motiondistance(DOUBLE),overspeedstate(BOOLEAN),overspeedtime(TIMESTAMP),overspeedgeofenceid(INT) added to tc_devices
2023-01-02 15:37:12  INFO: Table tc_commands_queue created
2023-01-02 15:37:12  INFO: Foreign key constraint added to tc_commands_queue (deviceid)
2023-01-02 15:37:12  INFO: Index idx_commands_queue_deviceid created
2023-01-02 15:37:12  INFO: ChangeSet changelog-5.4::changelog-5.4::author ran successfully in 332ms
2023-01-02 15:37:12  INFO: Column tc_commands_queue.description dropped
2023-01-02 15:37:12  INFO: ChangeSet changelog-5.5::changelog-5.5::author ran successfully in 28ms
2023-01-02 15:37:12  INFO: Successfully released change log lock
2023-01-02 15:37:13  INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
Anton Tananaev2 years ago

Interesting. This looks like something new.

Michael2 years ago

Hmm. running mySQL 8.0.31.0 Community edition

Anton Tananaev2 years ago

You can probably ignore the warning if it doesn't cause any issues.

Michael2 years ago

Don’t see any issues. Traccar is working like charm! Thanks for that.

Only with SSL and Push notification I have an issue.

When connected via web browser or iOS Traccar Manager to http://MYURL.com:8082 everything works. I get web and push notification on the browser and in Traccar Manager for iOS.

Now I added SSL support as described here (but using bought wildcard certificate, no Let's encrypt): https://freek.ws/2017/12/09/tutorial-how-to-secure-traccar-with-ssl-https-for-free-using-iis-and-lets-encrypt-on-windows-server/#comment-14776

When connected via web browser or iOS Traccar Manager to httpS://MYURL.com:4443 I don't get any push notification. Not web neither push.
Everything else does work when connected via SSL.