Serveur 5.8

KONAN Georges10 months ago

Bonjour après la mise a jours de mon serveur la page affiche " fail fech"
Qu'est ce Que je peu faire

Haim Rodrik10 months ago

Translation:

Hello after updating my server the page displays "fail fech"
What can I do

Anton Tananaev10 months ago

You should check at least the process status and logs first.

KONAN Georges10 months ago

I use apache 2.4.57 I think I have an incompatibility which version of apache recommend me you

Track-trace210 months ago

@KONAN Georges

Meaby you are not reading? Why didnt you provide the log for anyone to give advise

danko10 months ago

Hello
@tananaev and track-trace2
I work with @KONAN Georges I will provide more technical details
Version 5.8
database mysql
server linux ubuntu
apache server for proxy
we ran an upgrade of traccar from 5.3 to 5.8
After update we got error fail fech on web interface
I stopped apache server but still cannot access to traccar app
traccar logs

2023-06-19 21:22:08  INFO: Operating system name: Linux version: 4.15.0-197-generic architecture: amd64
2023-06-19 21:22:08  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 17.0.6+10
2023-06-19 21:22:08  INFO: Memory limit heap: 500mb non-heap: 0mb
2023-06-19 21:22:08  INFO: Character encoding: UTF-8 charset: UTF-8
2023-06-19 21:22:08  INFO: Version: 5.8
2023-06-19 21:22:08  INFO: Starting server...
2023-06-19 21:22:08  INFO: HikariPool-1 - Starting...
2023-06-19 21:22:09  INFO: HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@7a356a0d
2023-06-19 21:22:09  INFO: HikariPool-1 - Start completed.
2023-06-19 21:22:09  INFO: Clearing database change log checksums
2023-06-19 21:22:09  INFO: Successfully acquired change log lock
2023-06-19 21:22:10  INFO: Successfully released change log lock
2023-06-19 21:22:10  INFO: Successfully acquired change log lock
2023-06-19 21:22:11  INFO: Reading from traccar.DATABASECHANGELOG
2023-06-19 21:22:12  INFO: Reading from traccar.DATABASECHANGELOG
2023-06-19 21:22:12  INFO: Using deploymentId: 7209732487
2023-06-19 21:22:12  INFO: Reading from traccar.DATABASECHANGELOG
2023-06-19 21:22:12 ERROR: ChangeSet changelog-5.8::changelog-5.8::author encountered an exception.
2023-06-19 21:22:12  INFO: Update command encountered an exception.
2023-06-19 21:22:12  INFO: Successfully released change log lock
2023-06-19 21:22:12  INFO: Successfully released change log lock
2023-06-19 21:22:12  INFO: Command execution complete
2023-06-19 21:22:12 ERROR: Main method error - Can't DROP 'geofenceids'; check that column/key exists - SQLSyntaxErrorException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < MainModule:123 < ...)
2023-06-19 21:22:24  INFO: Operating system name: Linux version: 4.15.0-197-generic architecture: amd64

PS: "we don't have a backup database and our database is around 15Gb"

Anton Tananaev10 months ago

Based on the logs, most likely the database migration has failed. So you have to do it manually.

danko10 months ago

thanks @tananaev
I'm not an expert of traccar nor java could you tell me how to run this migration manually or send me an explanation link please.

Anton Tananaev10 months ago

I don't have a step by step tutorial for it and it probably requires some technical knowledge.

danko10 months ago

thanks @tananaev for the help
At least I know where and what to fix I wil search for it on internet :)

danko10 months ago

I add the steps I used to fix the problem

  • version 5.8 migration drop column geofenceids from table tc_devices and add column geofenceids to tc_positions

the problem was that traccar wanted to run the migration that was already applied on the database so the error can't drop 'geofenceids' because the column was alread drop from DB
So my solution was to put the DB in the state before migration so the migration could run
thous ran the reverse sql request of migration

stopped traccar service
systemctl stop traccar

connect to mysql database and ran this commands

mysql SET sql_mode = '';
ALTER TABLE tc_devices ADD geofenceids VARCHAR(128);
ALTER TABLE tc_positions DROP COLUMN geofenceids;

Then restart traccar service
systemctl start traccar

after that steps the service started and worked fine

Macan10 months ago

Well I found this issue in the many servers with update to 5.8 and this danko answer should be marked as a solution that people know how to fix it.

Thank you