Error in traccar server mysql

mtrntx8 years ago

When I try to run traccar with mysql shows a error

STATUS | wrapper  | 2016/09/14 00:06:30 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2016/09/14 00:06:30 | Java Service Wrapper Community Edition 64-bit 3.5.28
STATUS | wrapper  | 2016/09/14 00:06:30 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/09/14 00:06:30 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/09/14 00:06:30 |
STATUS | wrapper  | 2016/09/14 00:06:30 | Launching a JVM...
INFO   | jvm 1    | 2016/09/14 00:06:30 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/09/14 00:06:31 | [WrapperSimpleAppMain] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | Wed Sep 14 00:06:31 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, $
INFO   | jvm 1    | 2016/09/14 00:06:31 | INFO 9/14/16 12:06 AM: liquibase: Clearing database change log checksums
INFO   | jvm 1    | 2016/09/14 00:06:32 | INFO 9/14/16 12:06 AM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/09/14 00:06:32 | INFO 9/14/16 12:06 AM: liquibase: Creating database history table with name: traccardb.DATABASECHANGELOG
INFO   | jvm 1    | 2016/09/14 00:06:32 | INFO 9/14/16 12:06 AM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/09/14 00:06:32 | INFO 9/14/16 12:06 AM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: Reading from traccardb.DATABASECHANGELOG
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table users created
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Unique constraint added to users(ema$
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table devices created
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Unique constraint added to devices(u$
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Table user_device created
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Foreign key constraint added to user$
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Foreign key constraint added to user$
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: 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/14 00:06:33 | SEVERE 9/14/16 12:06 AM: liquibase: /opt/traccar/schema/changelog-master.xml: changelog-3.3::changelog-3.3::author: Change Set changelog-3.3::changelo$
INFO   | jvm 1    | 2016/09/14 00:06:33 | INFO 9/14/16 12:06 AM: liquibase: changelog-3.3::changelog-3.3::author: Successfully released change log lock
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp:
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.3::changelog-3.3::author:
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:      Reason: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREATE TABLE traccardb.positi$
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeSet.execute(ChangeSet.java:605)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:214)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:192)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.Liquibase.update(Liquibase.java:188)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:291)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at org.traccar.database.DataManager.<init>(DataManager.java:88)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at org.traccar.Context.init(Context.java:136)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at org.traccar.Main.main(Main.java:30)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at java.lang.reflect.Method.invoke(Method.java:498)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at java.lang.Thread.run(Thread.java:745)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error: Caused by: liquibase.exception.DatabaseException: Invalid default value for 'devicetime' [Failed SQL: CREATE TABLE traccardb.position$
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:301)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:107)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1273)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1255)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.changelog.ChangeSet.execute(ChangeSet.java:568)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       ... 15 more
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'devicetime'
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.Util.getInstance(Util.java:387)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:942)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:299)
INFO   | jvm 1    | 2016/09/14 00:06:33 | WrapperSimpleApp Error:       ... 20 more
STATUS | wrapper  | 2016/09/14 00:06:35 | <-- Wrapper Stopped
Anton Tananaev8 years ago

What version of MySQL are you using?

Anton Tananaev8 years ago

Looks like the problem is with NO_ZERO_DATE mode in MySQL server:

http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date

Try to disable it.