Migration from 3.15 to 4.12

samjulo4 years ago

Hi, is there any sql scripts to migrate the mysql database from 3.15 to 4.12?

how to do the migration properly?

Anton Tananaev4 years ago
samjulo4 years ago

after reinstalling and creating a new mysql database .

Service does not start :

May 01 17:02:20 vps492 systemd[1]: traccar.service: Unit entered failed state.
May 01 17:02:20 vps492systemd[1]: traccar.service: Failed with result 'exit-code'.
May 01 17:02:22 vps492 systemd[1]: Stopped traccar.
Anton Tananaev4 years ago
  1. Why would you create a new database? Didn't you want to migrate the old one?
  2. Have you checked the server logs?
samjulo4 years ago
  1. first tried with the old database but i have the same result
  2. do you mean tacker-server.log there no new data in this file when i start the service

thank you for helping me

Anton Tananaev4 years ago

If it doesn't start and log is empty, you are doing something wrong. Try running manually.

samjulo4 years ago

Some data in the logs:

May  1 21:05:37 vps492989 traccar[23678]: #011at org.traccar.Main.run(Main.java:120)
May  1 21:05:37 vps492989 traccar[23678]: #011... 1 more
May  1 21:05:37 vps492989 traccar[23678]: Caused by: java.util.InvalidPropertiesFormatException: jdk.internal.org.xml.sax.SAXParseException;
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.PropertiesDefaultHandler.load(PropertiesDefaultHandler.java:85)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/java.util.Properties.loadFromXML(Properties.java:983)
May  1 21:05:37 vps492989 traccar[23678]: #011at org.traccar.config.Config.<init>(Config.java:39)
May  1 21:05:37 vps492989 traccar[23678]: #011... 3 more
May  1 21:05:37 vps492989 traccar[23678]: Caused by: jdk.internal.org.xml.sax.SAXParseException;
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.panic(ParserSAX.java:652)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.impl.Parser.pi(Parser.java:1596)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.impl.Parser.step(Parser.java:387)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:436)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:411)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:374)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.impl.SAXParserImpl.parse(SAXParserImpl.java:97)
May  1 21:05:37 vps492989 traccar[23678]: #011at java.base/jdk.internal.util.xml.PropertiesDefaultHandler.load(PropertiesDefaultHandler.java:83)
May  1 21:05:37 vps492989 traccar[23678]: #011... 5 more
May  1 21:05:37 vps492989 systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
May  1 21:05:37 vps492989 systemd[1]: traccar.service: Unit entered failed state.
May  1 21:05:37 vps492989 systemd[1]: traccar.service: Failed with result 'exit-code'.
May  1 21:05:47 vps492989 systemd[1]: traccar.service: Service hold-off time over, scheduling restart.
May  1 21:05:47 vps492989 systemd[1]: Stopped traccar.
May  1 21:05:47 vps492989 systemd[1]: Started traccar.
May  1 21:05:48 vps492989 traccar[23704]: 2021-05-01 21:05:48 ERROR: Main method error -  - SAXParseException (... < Config:39 < Context:272 < Main:120 < ...)
May  1 21:05:48 vps492989 traccar[23704]: Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Configuration file is not a valid XML document
May  1 21:05:48 vps492989 traccar[23704]: #011at org.traccar.Main.run(Main.java:147)
May  1 21:05:48 vps492989 traccar[23704]: #011at org.traccar.Main.main(Main.java:106)
May  1 21:05:48 vps492989 traccar[23704]: Caused by: java.lang.RuntimeException: Configuration file is not a valid XML document
May  1 21:05:48 vps492989 traccar[23704]: #011at org.traccar.config.Config.<init>(Config.java:54)
May  1 21:05:48 vps492989 traccar[23704]: #011at org.traccar.Context.init(Context.java:272)
May  1 21:05:48 vps492989 traccar[23704]: #011at org.traccar.Main.run(Main.java:120)
May  1 21:05:48 vps492989 traccar[23704]: #011... 1 more
May  1 21:05:48 vps492989 traccar[23704]: Caused by: java.util.InvalidPropertiesFormatException: jdk.internal.org.xml.sax.SAXParseException;
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.PropertiesDefaultHandler.load(PropertiesDefaultHandler.java:85)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/java.util.Properties.loadFromXML(Properties.java:983)
May  1 21:05:48 vps492989 traccar[23704]: #011at org.traccar.config.Config.<init>(Config.java:39)
May  1 21:05:48 vps492989 traccar[23704]: #011... 3 more
May  1 21:05:48 vps492989 traccar[23704]: Caused by: jdk.internal.org.xml.sax.SAXParseException;
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.panic(ParserSAX.java:652)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.impl.Parser.pi(Parser.java:1596)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.impl.Parser.step(Parser.java:387)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:436)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:411)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:374)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.impl.SAXParserImpl.parse(SAXParserImpl.java:97)
May  1 21:05:48 vps492989 traccar[23704]: #011at java.base/jdk.internal.util.xml.PropertiesDefaultHandler.load(PropertiesDefaultHandler.java:83)
May  1 21:05:48 vps492989 traccar[23704]: #011... 5 more
May  1 21:05:48 vps492989 systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
May  1 21:05:48 vps492989 systemd[1]: traccar.service: Unit entered failed state.
May  1 21:05:48 vps492989 systemd[1]: traccar.service: Failed with result 'exit-code'.
Anton Tananaev4 years ago

You have an invalid XML format in your config file.

samjulo4 years ago

error with jdbc driver:

2021-05-01 21:44:53  INFO: HikariPool-1 - Starting...
2021-05-01 21:44:53  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-05-01 21:44:59 ERROR: HikariPool-1 - Exception during pool initialization. - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
2021-05-01 21:44:59 ERROR: Main method error - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
2021-05-01 21:45:10  INFO: HikariPool-1 - Starting...
2021-05-01 21:45:10  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-05-01 21:45:16 ERROR: HikariPool-1 - Exception during pool initialization. - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
2021-05-01 21:45:16 ERROR: Main method error - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
2021-05-01 21:45:27  INFO: HikariPool-1 - Starting...
2021-05-01 21:45:27  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-05-01 21:45:33 ERROR: HikariPool-1 - Exception during pool initialization. - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
2021-05-01 21:45:33 ERROR: Main method error - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
2021-05-01 21:45:44  INFO: HikariPool-1 - Starting...
2021-05-01 21:45:44  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-05-01 21:45:50 ERROR: HikariPool-1 - Exception during pool initialization. - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
2021-05-01 21:45:50 ERROR: Main method error - The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. - InvalidConnectionAttributeException (... < DataManager:126 < *:85 < Context:289 < Main:120 < ...)
Anton Tananaev4 years ago

I would recommend you to do a search first before asking for more help. All of those errors were discussed many times and you can easily find a solution if you just take a bit more time and do some searching.

samjulo4 years ago

i am doing the searching, any directions could help:

seems like i nedd to change the driver from "com.mysql.jdbc.Driver" to "com.mysql.cj.jdbc.Driver"

Anton Tananaev4 years ago

You need to search for the error, not warning.

samjulo4 years ago

Problem solved thank you for your help

Track-trace4 years ago

@samjulo
It would be helpfull if you write the solution here for others who might face the same issue in the future.

samjulo4 years ago

i had to update the driver and also the connectionString

https://www.traccar.org/mysql/

@Track-trace are you a bot?