If you're talking about TRACCAR, even using h2, I see problems with your server ...
1- Did you check the documentation for the minimum requirements for traccar to work?
2- change only the traccar.xml and leave the default.xml intact.
But if there is actually a "traccart" and you're talking about it, please disregard my tips as they won't help.
Most common issue is invalid XML. You can try running it manually with java -jar tracker-server.jar conf/traccar.xml
and see what you get in the command line output.
Dear Anton,
i can't start it manually because the container won't start.
My docker log:
2020-11-06 11:41:53 ERROR: Main method error - The content of element type "properties" must match "(comment?,entry*)". - SAXParseException (... < Config:37 < Context:276 < Main:137 < ...),
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Configuration file is not a valid XML document,
at org.traccar.Main.run(Main.java:165),
at org.traccar.Main.main(Main.java:110),
Caused by: java.lang.RuntimeException: Configuration file is not a valid XML document,
at org.traccar.config.Config.<init>(Config.java:52),
at org.traccar.Context.init(Context.java:276),
at org.traccar.Main.run(Main.java:137),
... 1 more,
Caused by: java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 47; columnNumber: 14; The content of element type "properties" must match "(comment?,entry*)".,
at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:80),
at java.util.Properties$XmlSupport.load(Properties.java:1201),
at java.util.Properties.loadFromXML(Properties.java:881),
at org.traccar.config.Config.<init>(Config.java:37),
... 3 more,
Caused by: org.xml.sax.SAXParseException; lineNumber: 47; columnNumber: 14; The content of element type "properties" must match "(comment?,entry*)".,
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203),
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134),
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396),
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327),
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284),
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1994),
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:879),
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782),
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967),
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602),
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505),
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842),
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771),
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141),
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243),
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339),
at sun.util.xml.PlatformXmlPropertiesProvider.getLoadingDoc(PlatformXmlPropertiesProvider.java:106),
at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:78),
... 6 more,
My traccar.xml :
<?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'>org.h2.Driver</entry>
#<entry key='database.url'>jdbc:h2:./data/database</entry>
#<entry key='database.user'>sa</entry>
#<entry key='database.password'></entry>
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>xxxxx</entry>
<entry key='database.password'>xxxxx</entry>
<!-- EMAIL SETTINGS -->
<entry key='mail.smtp.host'>smtp.gmail.com</entry>
<entry key='mail.smtp.ssl.enable'>true</entry>
<entry key='mail.smtp.auth'>true</entry>
<entry key='mail.smtp.port'>465</entry>
<entry key='mail.smtp.from'>xxxxxx</entry>
<entry key='mail.smtp.username'>xxxxxx</entry>
<entry key='mail.smtp.password'>xxxxx</entry>
<!-- WEB SETTINGS -->
<entry key='web.url'>http://xxxxxxx:8082</entry>
<entry key="status.timeout">60</entry>
</properties>
What the hell is this:
#<entry key='database.driver'>org.h2.Driver</entry>
#<entry key='database.url'>jdbc:h2:./data/database</entry>
#<entry key='database.user'>sa</entry>
#<entry key='database.password'></entry>
If it's an attempt to comment, you should take your time and read about XML.
Hi,
If I start traccart with the h2 database, it will start successfully:
But, if i start whit mysql: Not srating, no log or other....
traccar.xml:
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://192.168.1.210:3306/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry> <entry key='database.user'>root</entry> <entry key='database.password'>mycorrectpassword</entry>
What do I do wrong?