I cant connect to Traccar after Mysql migration

Sandram7 years ago

Hello ,
I'm new to Traccar
I have follow the instructions for using MYSQL DB , My user and Password are correct since I can login at PHPmyAdmin.When i enter http://localhost:8082/ no joy
Also changed Configuration parameters for MySQL (replace [HOST], [DATABASE], [USER], [PASSWORD] with appropriate values; for local database use “localhost” as HOST):

Please Any help?

Sandram

PD here my wrapper logs :

...
INFO|wrapper|Service traccar|17-06-26 03:15:53|started process 19490
INFO|wrapper|Service traccar|17-06-26 03:15:53|started process with pid 19490
INFO|19490/0|Service traccar|17-06-26 03:15:57|[INFO] StandardFileSystemManager - Using "/tmp/vfs_cache" as temporary files store.
INFO|19490/0|Service traccar|17-06-26 03:15:58|java.lang.reflect.InvocationTargetException
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at java.lang.reflect.Method.invoke(Method.java:498)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|19490/0|Service traccar|17-06-26 03:15:58|Caused by: java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 27; columnNumber: 1; The end-tag for element type "entry" must end with a '>' delimiter.
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:80)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at java.util.Properties$XmlSupport.load(Properties.java:1201)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at java.util.Properties.loadFromXML(Properties.java:881)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at org.traccar.Config.load(Config.java:30)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at org.traccar.Context.init(Context.java:195)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at org.traccar.Main.main(Main.java:35)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	... 6 more
INFO|19490/0|Service traccar|17-06-26 03:15:58|Caused by: org.xml.sax.SAXParseException; lineNumber: 27; columnNumber: 1; The end-tag for element type "entry" must end with a '>' delimiter.
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1755)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at sun.util.xml.PlatformXmlPropertiesProvider.getLoadingDoc(PlatformXmlPropertiesProvider.java:106)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:78)
INFO|19490/0|Service traccar|17-06-26 03:15:58|	... 11 more
INFO|wrapper|Service traccar|17-06-26 03:15:58|waitpid 19490 59136
INFO|wrapper|Service traccar|17-06-26 03:15:58|exit code posix process: 59136 application: 0
...
Anton Tananaev7 years ago

You have an error in your config file. Please next time carefully read error messages in the logs before asking any questions. In this case in clearly says where the problem is. It even provides exact line number.

Sandram7 years ago

Antón,
You are absolutely right , for a first time in everything in Ubuntu , Lamp and traccar (I'm a Hardware lady) I just got this through fingers cracks .
Thanks for reply and heads up

Sandra Medina

Sandram7 years ago

Anton,
Sorry for disturbing you again but may be you can give me some hints. I reinstalled Traccar on Ubuntu 16.04 and tried to migrate to Mysql I still cant connect to http://localhost:8082/

Please advise
Thanks in advance
SandraM

Here is the Wrapper log:

...
INFO|7814/0|Service traccar|17-06-27 17:23:15|INFO 6/27/17 5:23 PM: liquibase: Successfully released change log lock
INFO|7814/0|Service traccar|17-06-27 17:23:15|INFO 6/27/17 5:23 PM: liquibase: Successfully acquired change log lock
INFO|7814/0|Service traccar|17-06-27 17:23:17|INFO 6/27/17 5:23 PM: liquibase: Reading from MyTraccarDB.DATABASECHANGELOG
INFO|7814/0|Service traccar|17-06-27 17:23:17|SEVERE 6/27/17 5:23 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Change Set changelog-3.3::changelog-3.3::author failed.  Error: Table 'users' already exists [Failed SQL: CREATE TABLE MyTraccarDB.users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(128) NOT NULL, email VARCHAR(128) NOT NULL, hashedpassword VARCHAR(128) NOT NULL, salt VARCHAR(128) NOT NULL, readonly BIT(1) DEFAULT 0 NOT NULL, admin BIT(1) DEFAULT 0 NOT NULL, map VARCHAR(128) DEFAULT 'osm' NOT NULL, language VARCHAR(128) DEFAULT 'en' NOT NULL, distanceunit VARCHAR(128) DEFAULT 'km' NOT NULL, speedunit VARCHAR(128) DEFAULT 'kmh' NOT NULL, latitude DOUBLE DEFAULT 0 NOT NULL, longitude DOUBLE DEFAULT 0 NOT NULL, zoom INT DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))]
INFO|7814/0|Service traccar|17-06-27 17:23:17|INFO 6/27/17 5:23 PM: liquibase: changelog-3.3::changelog-3.3::author: Successfully released change log lock
INFO|7814/0|Service traccar|17-06-27 17:23:17|java.lang.reflect.InvocationTargetException
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at java.lang.reflect.Method.invoke(Method.java:498)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|7814/0|Service traccar|17-06-27 17:23:17|Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.3::changelog-3.3::author:
INFO|7814/0|Service traccar|17-06-27 17:23:17|     Reason: liquibase.exception.DatabaseException: Table 'users' already exists [Failed SQL: CREATE TABLE MyTraccarDB.users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(128) NOT NULL, email VARCHAR(128) NOT NULL, hashedpassword VARCHAR(128) NOT NULL, salt VARCHAR(128) NOT NULL, readonly BIT(1) DEFAULT 0 NOT NULL, admin BIT(1) DEFAULT 0 NOT NULL, map VARCHAR(128) DEFAULT 'osm' NOT NULL, language VARCHAR(128) DEFAULT 'en' NOT NULL, distanceunit VARCHAR(128) DEFAULT 'km' NOT NULL, speedunit VARCHAR(128) DEFAULT 'kmh' NOT NULL, latitude DOUBLE DEFAULT 0 NOT NULL, longitude DOUBLE DEFAULT 0 NOT NULL, zoom INT DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))]
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.Liquibase.update(Liquibase.java:214)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.Liquibase.update(Liquibase.java:192)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.Liquibase.update(Liquibase.java:188)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:145)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at org.traccar.database.DataManager.<init>(DataManager.java:71)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at org.traccar.Context.init(Context.java:207)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at org.traccar.Main.main(Main.java:35)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	... 6 more
INFO|7814/0|Service traccar|17-06-27 17:23:17|Caused by: liquibase.exception.DatabaseException: Table 'users' already exists [Failed SQL: CREATE TABLE MyTraccarDB.users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(128) NOT NULL, email VARCHAR(128) NOT NULL, hashedpassword VARCHAR(128) NOT NULL, salt VARCHAR(128) NOT NULL, readonly BIT(1) DEFAULT 0 NOT NULL, admin BIT(1) DEFAULT 0 NOT NULL, map VARCHAR(128) DEFAULT 'osm' NOT NULL, language VARCHAR(128) DEFAULT 'en' NOT NULL, distanceunit VARCHAR(128) DEFAULT 'km' NOT NULL, speedunit VARCHAR(128) DEFAULT 'kmh' NOT NULL, latitude DOUBLE DEFAULT 0 NOT NULL, longitude DOUBLE DEFAULT 0 NOT NULL, zoom INT DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))]
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1277)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1259)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:582)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	... 15 more
INFO|7814/0|Service traccar|17-06-27 17:23:17|Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'users' already exists
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
INFO|7814/0|Service traccar|17-06-27 17:23:17|	at com.mysql.jdbc.Util.getInstance(Util.java:408)
Anton Tananaev7 years ago

Your database is not empty. It already has some tables.

Sandram7 years ago

Unfortunately for me , I'm still struggling with no connection to http://myip:8082/ after MYsql migration.
Yes there are some tables but still not connecting

Any other advise please ?

Sandra M

Sandram7 years ago

Here is my latest wrapper.log

...
INFO|6193/0|Service traccar|17-07-02 15:22:43|INFO 7/2/17 3:22 PM: liquibase: Clearing database change log checksums
INFO|6193/0|Service traccar|17-07-02 15:22:44|INFO 7/2/17 3:22 PM: liquibase: Successfully acquired change log lock
INFO|6193/0|Service traccar|17-07-02 15:22:44|INFO 7/2/17 3:22 PM: liquibase: Creating database history table with name: MyTraccarDB.DATABASECHANGELOG
INFO|6193/0|Service traccar|17-07-02 15:22:44|INFO 7/2/17 3:22 PM: liquibase: Successfully released change log lock
INFO|6193/0|Service traccar|17-07-02 15:22:44|INFO 7/2/17 3:22 PM: liquibase: Successfully acquired change log lock
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: Reading from MyTraccarDB.DATABASECHANGELOG
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table users created
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Unique constraint added to users(email)
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table devices created
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Unique constraint added to devices(uniqueid)
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table user_device created
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Foreign key constraint added to user_device (userid)
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Foreign key constraint added to user_device (deviceid)
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Index user_device_user_id created
INFO|6193/0|Service traccar|17-07-02 15:22:45|SEVERE 7/2/17 3:22 PM: liquibase: ./schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Change Set changelog-3.3::changelog-3.3::author failed.  Error: Invalid default value for 'devicetime' [Failed SQL: CREATE TABLE MyTraccarDB.positions (id INT AUTO_INCREMENT NOT NULL, protocol VARCHAR(128) NULL, deviceid INT NOT NULL, servertime timestamp NOT NULL, devicetime timestamp NOT NULL, fixtime timestamp NOT NULL, valid BIT(1) NOT NULL, latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, altitude FLOAT NOT NULL, speed FLOAT NOT NULL, course FLOAT NOT NULL, address VARCHAR(512) NULL, attributes VARCHAR(4096) NOT NULL, CONSTRAINT PK_POSITIONS PRIMARY KEY (id))]
INFO|6193/0|Service traccar|17-07-02 15:22:45|INFO 7/2/17 3:22 PM: liquibase: changelog-3.3::changelog-3.3::author: Successfully released change log lock
INFO|6193/0|Service traccar|17-07-02 15:22:45|java.lang.reflect.InvocationTargetException
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at java.lang.reflect.Method.invoke(Method.java:498)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|6193/0|Service traccar|17-07-02 15:22:45|Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.3::changelog-3.3::author:
INFO|6193/0|Service traccar|17-07-02 15:22:45|     Reason: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREATE TABLE MyTraccarDB.positions (id INT AUTO_INCREMENT NOT NULL, protocol VARCHAR(128) NULL, deviceid INT NOT NULL, servertime timestamp NOT NULL, devicetime timestamp NOT NULL, fixtime timestamp NOT NULL, valid BIT(1) NOT NULL, latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, altitude FLOAT NOT NULL, speed FLOAT NOT NULL, course FLOAT NOT NULL, address VARCHAR(512) NULL, attributes VARCHAR(4096) NOT NULL, CONSTRAINT PK_POSITIONS PRIMARY KEY (id))]
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.Liquibase.update(Liquibase.java:214)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.Liquibase.update(Liquibase.java:192)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.Liquibase.update(Liquibase.java:188)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:145)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at org.traccar.database.DataManager.<init>(DataManager.java:71)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at org.traccar.Context.init(Context.java:207)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at org.traccar.Main.main(Main.java:35)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	... 6 more
INFO|6193/0|Service traccar|17-07-02 15:22:45|Caused by: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREATE TABLE MyTraccarDB.positions (id INT AUTO_INCREMENT NOT NULL, protocol VARCHAR(128) NULL, deviceid INT NOT NULL, servertime timestamp NOT NULL, devicetime timestamp NOT NULL, fixtime timestamp NOT NULL, valid BIT(1) NOT NULL, latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, altitude FLOAT NOT NULL, speed FLOAT NOT NULL, course FLOAT NOT NULL, address VARCHAR(512) NULL, attributes VARCHAR(4096) NOT NULL, CONSTRAINT PK_POSITIONS PRIMARY KEY (id))]
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1277)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1259)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:582)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	... 15 more
INFO|6193/0|Service traccar|17-07-02 15:22:45|Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'devicetime'
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.Util.getInstance(Util.java:408)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2497)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2455)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:307)
INFO|6193/0|Service traccar|17-07-02 15:22:45|	... 20 more
INFO|wrapper|Service traccar|17-07-02 15:22:46|waitpid 6193 59136
INFO|wrapper|Service traccar|17-07-02 15:22:46|exit code posix process: 59136 application: 0
Anton Tananaev7 years ago

Most likely your config is incorrect or you are using very old version of MySQL.

Sandram7 years ago

Well ,

I have MySQL 5.7.18-0ubuntu0.16.04.1 in a Contabo VPS. It has InnoDB activated by default.

So old version of MySQL is out of the question.

I have researched a lot with no luck of what i may doing incorrect.

Any Hint?

Sandra

Anton Tananaev7 years ago

Can I see your config entries for database connection?

chserguei7 years ago

Hi Anton,

here in my wrapper.log I find following:

INFO|wrapper|Service traccar|17-07-04 11:35:20|exec:"java" "-classpath" "/opt/traccar/wrapperApp.jar:/opt/traccar/tracker-server.jar:/opt/traccar/lib/log4j-1.2.17.jar:/opt/traccar/lib/joda-time-2.9.9.jar:/opt/traccar/lib/h2-1.4.194.jar:/opt/traccar/lib/mysql-connector-java-5.1.41.jar:/opt/traccar/lib/postgresql-42.0.0.jre7.jar:/opt/traccar/lib/mssql-jdbc-6.1.0.jre7.jar:/opt/traccar/lib/HikariCP-java7-2.4.11.jar:/opt/traccar/lib/slf4j-api-1.7.21.jar:/opt/traccar/lib/netty-3.10.6.Final.jar:/opt/traccar/lib/async-http-client-1.9.40.jar:/opt/traccar/lib/slf4j-simple-1.7.25.jar:/opt/traccar/lib/javax.json-1.0.4.jar:/opt/traccar/lib/jetty-server-9.2.21.v20170120.jar:/opt/traccar/lib/javax.servlet-api-3.1.0.jar:/opt/traccar/lib/jetty-http-9.2.21.v20170120.jar:/opt/traccar/lib/jetty-io-9.2.21.v20170120.jar:/opt/traccar/lib/jetty-servlet-9.2.21.v20170120.jar:/opt/traccar/lib/jetty-security-9.2.21.v20170120.jar:/opt/traccar/lib/jetty-webapp-9.2.21.v20170120.jar:/opt/traccar/lib/jetty-xml-9.2.21.v20170120.jar:/opt/traccar/lib/jetty-jndi-9.2.21.v20170120.jar:/opt/traccar/lib/jetty-util-9.2.21.v20170120.jar:/opt/traccar/lib/websocket-server-9.2.21.v20170120.jar:/opt/traccar/lib/websocket-common-9.2.21.v20170120.jar:/opt/traccar/lib/websocket-api-9.2.21.v20170120.jar:/opt/traccar/lib/websocket-client-9.2.21.v20170120.jar:/opt/traccar/lib/websocket-servlet-9.2.21.v20170120.jar:/opt/traccar/lib/jersey-container-servlet-2.25.1.jar:/opt/traccar/lib/jersey-container-servlet-core-2.25.1.jar:/opt/traccar/lib/javax.inject-2.5.0-b32.jar:/opt/traccar/lib/jersey-common-2.25.1.jar:/opt/traccar/lib/javax.annotation-api-1.2.jar:/opt/traccar/lib/jersey-guava-2.25.1.jar:/opt/traccar/lib/hk2-api-2.5.0-b32.jar:/opt/traccar/lib/hk2-utils-2.5.0-b32.jar:/opt/traccar/lib/aopalliance-repackaged-2.5.0-b32.jar:/opt/traccar/lib/hk2-locator-2.5.0-b32.jar:/opt/traccar/lib/javassist-3.20.0-GA.jar:/opt/traccar/lib/osgi-resource-locator-1.0.1.jar:/opt/traccar/lib/jersey-server-2.25.1.jar:/opt/traccar/lib/jersey-client-2.25.1.jar:/opt/traccar/lib/jersey-media-jaxb-2.25.1.jar:/opt/traccar/lib/validation-api-1.1.0.Final.jar:/opt/traccar/lib/javax.ws.rs-api-2.0.1.jar:/opt/traccar/lib/jersey-media-json-jackson-2.25.1.jar:/opt/traccar/lib/jersey-entity-filtering-2.25.1.jar:/opt/traccar/lib/jackson-jaxrs-base-2.8.4.jar:/opt/traccar/lib/jackson-core-2.8.4.jar:/opt/traccar/lib/jackson-databind-2.8.4.jar:/opt/traccar/lib/jackson-jaxrs-json-provider-2.8.4.jar:/opt/traccar/lib/jackson-module-jaxb-annotations-2.8.4.jar:/opt/traccar/lib/jackson-annotations-2.8.4.jar:/opt/traccar/lib/liquibase-core-3.5.3.jar:/opt/traccar/lib/snakeyaml-1.17.jar:/opt/traccar/lib/mail-1.4.7.jar:/opt/traccar/lib/activation-1.1.jar:/opt/traccar/lib/jxls-2.4.0.jar:/opt/traccar/lib/commons-jexl-2.1.1.jar:/opt/traccar/lib/commons-beanutils-1.9.2.jar:/opt/traccar/lib/jcl-over-slf4j-1.7.12.jar:/opt/traccar/lib/logback-core-1.1.3.jar:/opt/traccar/lib/jxls-poi-1.0.12.jar:/opt/traccar/lib/poi-3.14.jar:/opt/traccar/lib/poi-ooxml-3.14.jar:/opt/traccar/lib/poi-ooxml-schemas-3.14.jar:/opt/traccar/lib/xmlbeans-2.6.0.jar:/opt/traccar/lib/stax-api-1.0.1.jar:/opt/traccar/lib/curvesapi-1.03.jar:/opt/traccar/lib/velocity-1.7.jar:/opt/traccar/lib/commons-collections-3.2.1.jar:/opt/traccar/lib/commons-lang-2.4.jar:/opt/traccar/lib/velocity-tools-2.0.jar:/opt/traccar/lib/commons-digester-1.8.jar:/opt/traccar/lib/commons-chain-1.1.jar:/opt/traccar/lib/commons-logging-1.1.jar:/opt/traccar/lib/servlet-api-2.3.jar:/opt/traccar/lib/commons-validator-1.3.1.jar:/opt/traccar/lib/dom4j-1.1.jar:/opt/traccar/lib/oro-2.0.8.jar:/opt/traccar/lib/sslext-1.2-0.jar:/opt/traccar/lib/struts-core-1.3.8.jar:/opt/traccar/lib/antlr-2.7.2.jar:/opt/traccar/lib/struts-taglib-1.3.8.jar:/opt/traccar/lib/struts-tiles-1.3.8.jar:/opt/traccar/lib/ical4j-2.0.0.jar:/opt/traccar/lib/commons-collections4-4.0.jar:/opt/traccar/lib/groovy-all-2.3.2.jar:/opt/traccar/lib/bndlib-2.3.0.jar:/opt/traccar/lib/org.osgi.core-4.3.1.jar:/opt/traccar/lib/commons-lang3-3.3.2.jar:/opt/traccar/lib/commons-codec-1.9.jar:/opt/traccar/lib/ch-smpp-5.0.9.jar:/opt/traccar/lib/ch-commons-util-6.0.2.jar:/opt/traccar/lib/ch-commons-charset-3.0.2.jar" "-Dfile.encoding=UTF-8" "-Xrs" "-Dwrapper.service=true" "-Dwrapper.console.visible=false" "-Dwrapper.port=15003" "-Dwrapper.key=-2613451381228393779" "-Dwrapper.teeName=-2613451381228393779$1499157319514" "-Dwrapper.tmp.path=/opt/traccar/tmp" "-Djna_tmpdir=/opt/traccar/tmp" "-Dwrapper.config=/opt/traccar/conf/wrapper.conf" "-Dwrapper.visible=false" "-Dwrapper.pidfile=/run/wrapper.traccar.pid" "org.rzo.yajsw.app.WrapperJVMMain"

As I understand Traccar trying to use mysql-connector-java-5.1.41.jar, but actual version in Debian and Ubuntu systems is mysql-connector-java-5.1.42.jar.

How can I fix it?

Anton Tananaev7 years ago

Traccar should be using the version that comes with it. Also, I don't really see why you care that much about minor version.

Sandram7 years ago

Hello,
You mean /etc/mysql/mysql.conf.d/mysqld.cnf ?
please advise

Sandra M

Anton Tananaev7 years ago

I meant Traccar config.

Sandram7 years ago

Sorry I dont have access to the system now but this is from my Procedure note :

<entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entry key='database.url'>jdbc:mysql://127.0.0.1:3306/MyTraccarDB?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8</entry>
<entry key='database.user'>MyTraccarSandraM</entry> 
<entry key='database.password'>Test123456</entry>

Thanks for your reply

SM