Traccar 3.7 Mysql problem

einmalacht8 years ago

Hello i want to install Traccar 3.7 with mySQL Database.
With H2 Database it is working well ...

When i try to start traccar with mysql configuration on Ubuntu it doesnt work.
Traccar is creating some tables in my clean database but the Web interface dont come up


<entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entry key='database.url'>jdbc:mysql://localhost:3306/traccar?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&useSSL=false</entry>
<entry key='database.user'>traccar</entry> 
<entry key='database.password'>traccar</entry>

I tried different charsets in SQL Database also utf8_general_ci

but the following Error appears on every try

INFO   | jvm 1    | 2016/09/11 19:08:47 | INFO 9/11/16 7:08 PM: liquibase: changelog-3.3::changelog-3.3::author: Successfully released change log lock
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp:
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.3::changelog-3.3::a            uthor:
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:      Reason: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREAT            E TABLE traccar.positions (id INT AUTO_INCREMENT NOT NULL, protocol VARCHAR(128) NULL, deviceid INT NOT NULL, servertime timestamp NOT NULL, devicetime timestamp NOT NULL, fix            time 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, addr            ess VARCHAR(512) NULL, attributes VARCHAR(4096) NOT NULL, CONSTRAINT PK_POSITIONS PRIMARY KEY (id))]
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeSet.execute(ChangeSet.java:605)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:214)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:192)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:188)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:141)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at org.traccar.database.DataManager.<init>(DataManager.java:67)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at org.traccar.Context.init(Context.java:150)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at org.traccar.Main.main(Main.java:35)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at java.lang.reflect.Method.invoke(Method.java:606)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at java.lang.Thread.run(Thread.java:745)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error: Caused by: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREATE             TABLE traccar.positions (id INT AUTO_INCREMENT NOT NULL, protocol VARCHAR(128) NULL, deviceid INT NOT NULL, servertime timestamp NOT NULL, devicetime timestamp NOT NULL, fixti            me 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, addres            s VARCHAR(512) NULL, attributes VARCHAR(4096) NOT NULL, CONSTRAINT PK_POSITIONS PRIMARY KEY (id))]
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:301)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:107)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1273)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1255)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeSet.execute(ChangeSet.java:568)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       ... 15 more
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'devicetime'
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.Util.getInstance(Util.java:387)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:942)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:299)
INFO   | jvm 1    | 2016/09/11 19:08:47 | WrapperSimpleApp Error:       ... 20 more
STATUS | wrapper  | 2016/09/11 19:08:49 | <-- Wrapper Stopped

Can someone give me a possible solution ?

Anton Tananaev8 years ago

What version of MySQL are you using? Are you running clean Traccar 3.7 setup (empty database)?

einmalacht8 years ago

Hi its Ubuntu 16.04 with
mysql Ver 14.14 Distrib 5.7.13, for Linux (x86_64) using EditLine wrapper

the database is new without tables ... but Traccar can create tables in my Database ..
so i dont think that it is a permission problem

greetz

einmalacht8 years ago

i made a system upgrade and now i have
mysql Ver 14.14 Distrib 5.7.15, for Linux (x86_64) using EditLine wrapper

but same problem ..
I made a startup with naked Database

wrapper log

STATUS | wrapper  | 2016/09/13 21:47:47 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2016/09/13 21:47:47 | Java Service Wrapper Community Edition 64-bit 3.5.28
STATUS | wrapper  | 2016/09/13 21:47:47 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/09/13 21:47:47 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/09/13 21:47:47 |
STATUS | wrapper  | 2016/09/13 21:47:48 | Launching a JVM...
INFO   | jvm 1    | 2016/09/13 21:47:48 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/09/13 21:47:49 | [WrapperSimpleAppMain] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO   | jvm 1    | 2016/09/13 21:47:50 | INFO 9/13/16 9:47 PM: liquibase: Clearing database change log checksums
INFO   | jvm 1    | 2016/09/13 21:47:50 | INFO 9/13/16 9:47 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/09/13 21:47:50 | INFO 9/13/16 9:47 PM: liquibase: Creating database history table with name: traccar.DATABASECHANGELOG
INFO   | jvm 1    | 2016/09/13 21:47:51 | INFO 9/13/16 9:47 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/09/13 21:47:51 | INFO 9/13/16 9:47 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/09/13 21:47:53 | INFO 9/13/16 9:47 PM: liquibase: Reading from traccar.DATABASECHANGELOG
INFO   | jvm 1    | 2016/09/13 21:47:53 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table users created
INFO   | jvm 1    | 2016/09/13 21:47:53 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Unique constraint added to users(email)
INFO   | jvm 1    | 2016/09/13 21:47:54 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table devices created
INFO   | jvm 1    | 2016/09/13 21:47:54 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Unique constraint added to devices(uniqueid)
INFO   | jvm 1    | 2016/09/13 21:47:54 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table user_device created
INFO   | jvm 1    | 2016/09/13 21:47:55 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Foreign key constraint added to user_device (userid)
INFO   | jvm 1    | 2016/09/13 21:47:55 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Foreign key constraint added to user_device (deviceid)
INFO   | jvm 1    | 2016/09/13 21:47:56 | INFO 9/13/16 9:47 PM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Index user_device_user_id created
INFO   | jvm 1    | 2016/09/13 21:47:56 | SEVERE 9/13/16 9:47 PM: liquibase: /opt/traccar/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 traccar.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   | jvm 1    | 2016/09/13 21:47:56 | INFO 9/13/16 9:47 PM: liquibase: changelog-3.3::changelog-3.3::author: Successfully released change log lock
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp:
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.3::changelog-3.3::author:
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:      Reason: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREATE TABLE traccar.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   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeSet.execute(ChangeSet.java:605)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:214)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:192)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:188)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:141)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at org.traccar.database.DataManager.<init>(DataManager.java:67)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at org.traccar.Context.init(Context.java:150)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at org.traccar.Main.main(Main.java:35)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at java.lang.reflect.Method.invoke(Method.java:606)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at java.lang.Thread.run(Thread.java:745)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error: Caused by: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREATE TABLE traccar.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   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:301)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:107)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1273)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1255)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeSet.execute(ChangeSet.java:568)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       ... 15 more
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'devicetime'
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.Util.getInstance(Util.java:387)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:942)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:299)
INFO   | jvm 1    | 2016/09/13 21:47:56 | WrapperSimpleApp Error:       ... 20 more
STATUS | wrapper  | 2016/09/13 21:47:58 | <-- Wrapper Stopped

server.log

2016-09-13 21:47:49  INFO: Operating system name: Linux version: 4.4.0-36-generic architecture: amd64
2016-09-13 21:47:49  INFO: Java runtime name: Java HotSpot(TM) 64-Bit Server VM vendor: Oracle Corporation version: 24.80-b11
2016-09-13 21:47:49  INFO: Memory limit heap: 878mb non-heap: 130mb
2016-09-13 21:47:49  INFO: Character encoding: UTF-8 charset: UTF-8
2016-09-13 21:47:49  INFO: Version: 3.7-SNAPSHOT
Anton Tananaev8 years ago

What if you manually run this query in the database:

CREATE TABLE traccar.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));
einmalacht8 years ago

These are the output from the command above:

ERROR 1067 (42000): Invalid default value for 'devicetime'

Anton Tananaev8 years ago

I'm guessing that your MySQL server configured to assign default values to timestamp fields. And that default value is invalid (probably zero).

einmalacht8 years ago

Okay it is a stadart Ubuntu 16.04 installation ... any idea to solve this?

Anton Tananaev8 years ago

Try database configuration parameters from here:

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

einmalacht8 years ago

Hello ,

now it is working fine!
Many Thx for that fast solution

spacif8 years ago

Hi, I'm new to this forum and I have been playing with this very nice Traccar software for quite a time now . I didn't have any problem installing and configuring the server and client until I decided to try configuring for the Mysql database. I followed the instructions in this url: https://www.traccar.org/mysql/ and somehow i am getting an error which is:

INFO   | jvm 1    | 2016/09/28 16:07:21 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/09/28 16:07:21 | WrapperSimpleApp: 
INFO   | jvm 1    | 2016/09/28 16:07:21 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2016/09/28 16:07:21 | WrapperSimpleApp Error: java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 33; columnNumber: 41; The entity name must immediately follow the '&' in the entity reference.
...

I'm using Traccar 3.7(clean install) on Wndows 10 Desktop and Mysql server Version 5.7.15.
I can create a table(positions) on the database manually without a problem.

Is there something that I'm missing on the server configuration?
I appreciate it if you can help me on this.
Thanks a lot!

Anton Tananaev8 years ago

You have a problem with XML format in the config file.

spacif8 years ago

Awesome. All is fine now. Thanks a lot!