Configuration file is not a valid XML document
Hi,
Thank you,
I fixed and i get another error :
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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.
I fixed by changin in traccar.xml by adding :
&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
to myconnection mysql.
After that , i get :
/opt/traccar$ sudo ./jre/bin/java -jar tracker-server.jar conf/traccar.xml
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/opt/traccar/lib/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
i t was stoped there.
When i checked the log i see some errors like :
***
INFO: Marking ChangeSet: changelog-4.1::changelog-4.1-mssql::author ran despite precondition failure due to onFa
il='MARK_RAN':
./schema/changelog-master.xml : DBMS Precondition failed: expected mssql, got mysql
***
***
***
2020-04-15 20:02:30 INFO: Operating system name: Linux version: 4.15.0-74-generic architecture: amd64
2020-04-15 20:02:30 INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 11.0.5+10-LTS
2020-04-15 20:02:30 INFO: Memory limit heap: 1996mb non-heap: 0mb
2020-04-15 20:02:30 INFO: Character encoding: UTF-8 charset: UTF-8
2020-04-15 20:02:30 INFO: Version: 4.8
2020-04-15 20:02:30 INFO: Starting server...
2020-04-15 20:02:31 INFO: jetty-9.4.26.v20200117; built: 2020-01-17T12:35:33.676Z; git: 7b38981d25d14afb4a12ff1f2596756144edf695; jv
m 11.0.5+10-LTS
2020-04-15 20:02:31 INFO: Started o.t.w.@70f98f7a{/,null,AVAILABLE}
2020-04-15 20:02:31 INFO: DefaultSessionIdManager workerName=node0
2020-04-15 20:02:31 INFO: No SessionScavenger set, using defaults
2020-04-15 20:02:31 INFO: node0 Scavenging every 660000ms
2020-04-15 20:02:32 INFO: Started o.e.j.s.ServletContextHandler@796cf2b5{/,null,AVAILABLE}
2020-04-15 20:02:32 INFO: Started ServerConnector@35dece42{HTTP/1.1,[http/1.1]}{0.0.0.0:8082}
2020-04-15 20:02:32 INFO: Started @15106ms
I found the issue well done in my case :
https://github.com/traccar/traccar/commit/6f03d2da1bfb610eb7b572cfdf008893e159da7e
What can i do ? Is it a big probleme ? How can i fixed it
Hi again,
I really need help :
> systemctl status traccar.service
● traccar.service - traccar
Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-15 00:32:20 CEST; 1 day 17h ago
Process: 1507 ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml (code=exited, status=1/FAILURE)
Main PID: 1507 (code=exited, status=1/FAILURE)
Apr 15 00:32:20 Server traccar[1507]: at java.base/jdk.internal.util.xml.impl.ParserSAX.panic(ParserSAX.java:652)
Apr 15 00:32:20 Server traccar[1507]: at java.base/jdk.internal.util.xml.impl.Parser.step(Parser.java:355)
Apr 15 00:32:20 Server traccar[1507]: at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:508)
Apr 15 00:32:20 Server traccar[1507]: at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:411)
Apr 15 00:32:20 Server traccar[1507]: at java.base/jdk.internal.util.xml.impl.ParserSAX.parse(ParserSAX.java:374)
Apr 15 00:32:20 Server traccar[1507]: at java.base/jdk.internal.util.xml.impl.SAXParserImpl.parse(SAXParserImpl.java:97)
Apr 15 00:32:20 Server traccar[1507]: at java.base/jdk.internal.util.xml.PropertiesDefaultHandler.load(PropertiesDefaultHandler.java:83)
Apr 15 00:32:20 Server traccar[1507]: ... 5 more
Apr 15 00:32:20 Server systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
Apr 15 00:32:20 Server systemd[1]: traccar.service: Failed with result 'exit-code'.
Thanks in advance
The issue is still the same. Your XML file is invalid.
Hi,
This is my traccar.xml :
( I changed "<" by "[" ) for visibility :
[?xml version='1.0' encoding='UTF-8'?>
[!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
[properties>
[entry key='config.default'>./conf/default.xml[/entry>
[!--
This is the main configuration file. All your configuration parameters should be placed in this file.
Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
remove "config.default" parameter from this file unless you know what you are doing.
For list of available parameters see following page: https://www.traccar.org/configuration-file/
-->
[entry key='database.driver'>com.mysql.cj.jdbc.Driver[/entry>
[entry key='database.url'>jdbc:mysql://localhost/traccardb?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC[/entry>
[entry key='database.user'>traccarmanager[/entry>
[entry key='database.password'>XXXXXXXX[/entry>
[/properties>
Thanks again
I'm not going to check it for you. There are plenty of tools to validate XML files that you can use.
My XML is valid (i check it by : https://codebeautify.org/xmlvalidator)
But i have always the same Error.
We have paid support if you want someone to take a look at your server, but from the error message it's pretty clear that the issue is with one of the XML configs.
I got same issue, which cause by the password has special character, make sure you encode it also, I used https://coderstoolbox.net/string/#!encoding=xml&action=encode&charset=us_ascii
If that does not work, just change the password by remove special characters, good luck
Hi,
It's my first time, I need some help to install traccar on VPS ( Ubuntu ).
When i'm trying to start service [./jre/bin/java -jar tracker-server.jar conf/traccar.xml] i get :
Can you help me plz.