Service stops after change in configuration

GP_project8 years ago

when changing the configuration in file traccar.xml so that traccar write in mysql database, then restart the service, it doesn't start again.

here is the configuration in traccar.xml

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <!--

    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="config.default">./conf/default.xml</entry>

    <entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entry key='database.url'>jdbc:mysql://localhost:3306/trans_tracking?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>root</entry> 
<entry key='database.password'>mypass</entry>
<entry key=’database.checkTable’>traccar</entry>

</properties>

wrapper.log

INFO|wrapper|Service traccar|17-04-18 16:25:27|Win service stop - timeout: 30000
INFO|wrapper|Service traccar|17-04-18 16:25:27|Win service wrapper.control -> stopping application
INFO|wrapper|Service traccar|17-04-18 16:25:27|stopping process with pid/timeout 2552 45000
INFO|2552/0|Service traccar|17-04-18 16:25:28|wrapper manager received stop command
INFO|2552/0|Service traccar|17-04-18 16:25:28|[Thread-13] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@30c3ae63{HTTP/1.1}{0.0.0.0:8082}
INFO|2552/0|Service traccar|17-04-18 16:25:29|[Thread-13] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@70f68288{/api,null,UNAVAILABLE}
INFO|wrapper|Service traccar|17-04-18 16:25:30|process exit code: 0
INFO|wrapper|Service traccar|17-04-18 16:25:30|Win service stop - after shutdown
INFO|wrapper|Service traccar|17-04-18 16:25:30|Win service stop - before notify
INFO|wrapper|Service traccar|17-04-18 16:25:30|Win service terminated
WARNING|wrapper|Service traccar|17-04-18 16:26:10|YAJSW: yajsw-stable-12.08
WARNING|wrapper|Service traccar|17-04-18 16:26:10|OS   : Windows NT (unknown)/10.0/amd64
WARNING|wrapper|Service traccar|17-04-18 16:26:10|JVM  : Oracle Corporation/1.8.0_121/C:\Program Files\Java\jre1.8.0_121/64
INFO|wrapper|Service traccar|17-04-18 16:26:10|start delay: 0
INFO|wrapper|Service traccar|17-04-18 16:26:11|started process with pid 2880
INFO|2880/0|Service traccar|17-04-18 16:26:15|[INFO] StandardFileSystemManager - Using "C:\Windows\TEMP\vfs_cache" as temporary files store.
INFO|2880/0|Service traccar|17-04-18 16:26:17|java.lang.reflect.InvocationTargetException
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at java.lang.reflect.Method.invoke(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|2880/0|Service traccar|17-04-18 16:26:17|Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at sun.util.xml.PlatformXmlPropertiesProvider.getLoadingDoc(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at sun.util.xml.PlatformXmlPropertiesProvider.load(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at java.util.Properties$XmlSupport.load(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at java.util.Properties.loadFromXML(Unknown Source)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at org.traccar.Config.load(Config.java:30)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at org.traccar.Context.init(Context.java:186)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	at org.traccar.Main.main(Main.java:35)
INFO|2880/0|Service traccar|17-04-18 16:26:17|	... 6 more
INFO|wrapper|Service traccar|17-04-18 16:26:17|calling onStop
INFO|wrapper|Service traccar|17-04-18 16:26:17|Win service stop - timeout: 30000
INFO|wrapper|Service traccar|17-04-18 16:26:17|Win service wrapper.control -> stopping application
INFO|wrapper|Service traccar|17-04-18 16:26:17|Win service stop - after shutdown
INFO|wrapper|Service traccar|17-04-18 16:26:17|Win service stop - before notify
INFO|wrapper|Service traccar|17-04-18 16:26:17|Win service terminated
Anton Tananaev8 years ago

The problem is:

Invalid byte 1 of 1-byte UTF-8 sequence.

So I guess there is some encoding issue in your config file.

Also, what is "database.checkTable"? Where did you get it?

GP_project8 years ago

when creating mysql schema i've chosed the collation to be utf8-general-ci , is that related to the encoding issue?

for “database.checkTable”: before i add it to the file, service was working but tables aren't generated in the database, so when i searched for a solution to this problem i found that maybe i should add it.

Anton Tananaev8 years ago

The problem is with your config file, not database.

Anton Tananaev8 years ago

As for "checkTable", you shouldn't have it. If you need it, it means that you are either using very old version of Traccar.