Update from 5.5 to 6.2

Gabriel5 months ago

Hello, im trying to update from 5.5 to 6.2, it doesnt matter wich backup i get from the SQL, y recieve this error in the log. Is there something special i need to work on? I've being updating the live server since 3.16 without problems.

Main method error - Duplicate column name 'motionstreak' - SQLSyntaxErrorException (... < DatabaseModule:99 < <gener:-1 < *:-1 < ... < MainModule:128 < ...)

Thanks in advance!

Track-trace5 months ago

How about checking for the Duplicate column name 'motionstreak'

Cristian5 months ago
Anton Tananaev5 months ago

Do you have this column in your backup database? If yes, it means you weren't on 5.5 before.

Gabriel5 months ago

Anton, from /api/server on the live server i get: "version":"5.5" and there is no column with that name in the DB

Anton Tananaev5 months ago

If there's no column with that name, it wouldn't give the error. Are you sure you didn't restart in the middle of database migration process?

Gabriel5 months ago

Hi Anton, i instaled from 0 5.4 with the database from the live server, works ok. Upgraded to 5.5 works ok, jump to 5.12 and i get this errors, only added the SQL in the config file and get this in the log.

Any idea whats wrong?

2024-07-29 17:10:10  INFO: Columns motionstreak(BOOLEAN) added to tc_devices
2024-07-29 17:10:10 ERROR: ChangeSet changelog-5.6::changelog-5.6::author encountered an exception.
2024-07-29 17:10:10 ERROR: Main method error - Table 'tc_reports' already exists - SQLSyntaxErrorException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < MainModule:126 < ...)
2024-07-29 17:10:10  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@1e8b7643 threw the following exception - Table 'tc_reports' already exists - SQLSyntaxErrorException
2024-07-29 17:14:38 ERROR: Main method error - Connection refused: no further information - ConnectException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < MainModule:126 < ...)
2024-07-29 17:14:38  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@1e8b7643 threw the following exception - Connection refused: no further information - ConnectException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < MainModule:126 < ...)
Anton Tananaev5 months ago

Table tc_reports was added in version 5.6, so your error is most likely one of two things:

  1. You didn't have 5.5, but instead had some work in progress build from master, like a preview version for example
  2. Your upgrade failed and this is the error you're getting on a second attempt to upgrade
Gabriel5 months ago

i downloaded 5.5 from old versions, user the database, works fine, i upgrade to any other version and it brings errors in the tc_reports or the motionstreak column.

Ill go from 5.5 to 5.6 and let you know if i keep getting the error. Live server is 5.5 for sure since i had to reinstall in the backup one and works OK.

Gabriel5 months ago

Same backup file from live database. 5.5 Starts and works ok. 5.6 crashes.

5.5

2024-07-29 22:47:33  INFO: Version: 5.5
2024-07-29 22:47:33  INFO: Starting server...
2024-07-29 22:47:34  INFO: HikariPool-1 - Starting...
2024-07-29 22:47:34  INFO: HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@2daabe3e
2024-07-29 22:47:34  INFO: HikariPool-1 - Start completed.
2024-07-29 22:47:34  INFO: Clearing database change log checksums
2024-07-29 22:47:34  INFO: Successfully acquired change log lock
2024-07-29 22:47:34  INFO: Successfully released change log lock
2024-07-29 22:47:35  INFO: Successfully acquired change log lock
2024-07-29 22:47:35  INFO: Reading from localizalo.DATABASECHANGELOG
2024-07-29 22:47:36  INFO: Reading from localizalo.DATABASECHANGELOG
2024-07-29 22:47:36  INFO: Successfully released change log lock
2024-07-29 22:47:36  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.
2024-07-29 22:47:37  WARN: Port disabled due to conflict - Address already in use: bind - BindException (...)
2024-07-29 22:47:37  INFO: jetty-10.0.12; built: 2022-09-14T01:54:40.076Z; git: 408d0139887e27a57b54ed52e2d92a36731a7e88; jvm 17.0.4+8
2024-07-29 22:47:37  INFO: Started o.t.w.@29c42969{/,null,AVAILABLE}
2024-07-29 22:47:37  INFO: Session workerName=node0
2024-07-29 22:47:37  WARN: JAXBContext implementation could not be found. WADL feature is disabled.
2024-07-29 22:47:38  INFO: Started o.e.j.s.ServletContextHandler@4dd7765a{/,null,AVAILABLE}
2024-07-29 22:47:38  INFO: Started ServerConnector@3958fca6{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2024-07-29 22:47:38  INFO: Started Server@784ee60d{STARTING}[10.0.12,sto=0] @5219ms
2024-07-29 22:47:50  INFO: user: 30, action: login, from: 127.0.0.1

5.6

2024-07-29 22:50:31  INFO: Version: 5.6
2024-07-29 22:50:31  INFO: Starting server...
2024-07-29 22:50:31  INFO: HikariPool-1 - Starting...
2024-07-29 22:50:31  INFO: HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@59436115
2024-07-29 22:50:31  INFO: HikariPool-1 - Start completed.
2024-07-29 22:50:31  INFO: Clearing database change log checksums
2024-07-29 22:50:31  INFO: Successfully acquired change log lock
2024-07-29 22:50:32  INFO: Successfully released change log lock
2024-07-29 22:50:32  INFO: Successfully acquired change log lock
2024-07-29 22:50:32  INFO: Reading from localizalo.DATABASECHANGELOG
2024-07-29 22:50:33  INFO: Reading from localizalo.DATABASECHANGELOG
2024-07-29 22:50:33  INFO: Successfully released change log lock
2024-07-29 22:50:33 ERROR: Main method error - Duplicate column name 'motionstreak' - SQLSyntaxErrorException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < Main:126 < ...)
2024-07-29 22:50:33  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@82ea68c threw the following exception - Duplicate column name 'motionstreak' - SQLSyntaxErrorException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < Main:126 < ...)
Anton Tananaev5 months ago

Same story. You should check Liquibase changelogs against your database backup.