Server upgrade

kyler2 years ago

Now I'm using Traccar v. 4.12 and is running fine. I wish to update to the last version but i'm scared by potential issues with users.

I need to upgrade also Traccar Client and Manager?
How can I backup current install to be able to rollback everything (including database history) in case of issues?

Anton Tananaev2 years ago

You don't have to upgrade the mobile apps.

You can backup the database and the Traccar folder. That should be enough to restore everything if something goes wrong.

kyler2 years ago

Tried to update but no success.
I have run traccar-setup as administrator, it say traccar is running and I gave permission to close.
The installations completes without errors but the http port is closed.
Checked the service and seems to be running.
Tried to stop the service but it times out.
Taskkillet the pid then restarted. It seems to start but no http interface on any port.
Rebooted the server. Same as above. Service is running but no http.

Second try:
Taskkilled the service then erased traccar folder.
Reinstalled from scratch.
Now all is working but obiously no data....
Stopped the service (now it stop correctly without need to kill), Replaced database files with mine.
Restarted the service but again no http.

It looks like the old database from V. 4.12 is not compatible with V. 5.7

Restoring my old traccar folder and database let me rollback to v. 4.12

Any idea?
Updating to intermediate version may help? in case what version?

Anton Tananaev2 years ago

Have you checked the logs? That's the first thing you should check when you have a problem.

kyler2 years ago

Reinstallet 5.7. this is the log:

2023-05-10 19:01:16  INFO: Operating system name: Windows Server 2012 R2 version: 6.3 architecture: amd64
2023-05-10 19:01:16  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 17.0.6+10
2023-05-10 19:01:16  INFO: Memory limit heap: 4034mb non-heap: 0mb
2023-05-10 19:01:16  INFO: Character encoding: Cp1252 charset: windows-1252
2023-05-10 19:01:16  INFO: Version: 5.7
2023-05-10 19:01:16  INFO: Starting server...
2023-05-10 19:01:16  INFO: HikariPool-1 - Starting...
2023-05-10 19:01:17 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 < ... < MainModule:123 < ...)
2023-05-10 19:01:17 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 < ... < MainModule:123 < ...)
2023-05-10 19:01:17  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@4b213651 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 < ... < MainModule:123 < ...)
Anton Tananaev2 years ago

Looks like you're using H2 database, which is against our recommendations. That is now causing the issue because they changed the database format. If you want to continue using it, you can find migration instructions on the forum. But I want to reiterate that our recommendation is not to use H2 database in production environment.

kyler2 years ago

I really don't know what kind of database I'm using.
I installed traccar as is years ago and I never made any changes till now.
I'm using traccar to track our company trucks.
I'll stick with V. 4.12
Thank you anyway