Fresh Traccar Installation not creating tables in MySql database.

bruno9 years ago

Hi everyone! Firstly, thank you so much to the developers for this wonderful open-source project! I just installed 64-bit traccar server on ubuntu. I am able to access my web ui properly. I then wanted to change to use MySQL database and edited my linux.cfg file like this:

<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://127.0.0.1:3306/gpstrack?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES</entry>
<entry key='database.user'>root</entry>
<entry key='database.password'>pass1234</entry>

But I don't see any tables in that database when I access it through phpmyadmin.

My wrapper.log :

STATUS | wrapper  | 2016/03/22 07:49:36 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2016/03/22 07:49:36 | Java Service Wrapper Community Edition 64-bit 3.5.28
STATUS | wrapper  | 2016/03/22 07:49:36 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/03/22 07:49:36 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/03/22 07:49:36 |
STATUS | wrapper  | 2016/03/22 07:49:37 | Launching a JVM...
INFO   | jvm 1    | 2016/03/22 07:49:37 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/03/22 07:49:38 | [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
INFO   | jvm 1    | 2016/03/22 07:49:38 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
INFO   | jvm 1    | 2016/03/22 07:49:39 | INFO 3/22/16 7:49 AM: liquibase: Clearing database change log checksums
INFO   | jvm 1    | 2016/03/22 07:49:39 | INFO 3/22/16 7:49 AM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/03/22 07:49:39 | INFO 3/22/16 7:49 AM: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG
INFO   | jvm 1    | 2016/03/22 07:49:40 | INFO 3/22/16 7:49 AM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/03/22 07:49:40 | INFO 3/22/16 7:49 AM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/03/22 07:49:42 | INFO 3/22/16 7:49 AM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Table users created
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Unique constraint added to users(email)
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Table devices created
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Unique constraint added to devices(uniqueid)
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Table user_device created
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Foreign key constraint added to user_device (userid)
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Foreign key constraint added to user_device (deviceid)
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Index user_device_user_id created
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Table positions created
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Foreign key constraint added to positions (deviceid)
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Index position_deviceid_fixtime created
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: Table server created
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: New row inserted into server
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: New row inserted into users
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author: ChangeSet /opt/traccar/data/changelog-3.3.xml::changelog-3.3::author ran successfully in 621ms
INFO   | jvm 1    | 2016/03/22 07:49:43 | INFO 3/22/16 7:49 AM: liquibase: Successfully released change log lock

and my tracker-server.log:

2016-03-22 07:49:37  INFO: Operating system name: Linux version: 3.13.0-79-generic architecture: amd64
2016-03-22 07:49:37  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 24.95-b01
2016-03-22 07:49:37  INFO: Memory limit heap: 237mb non-heap: 214mb
2016-03-22 07:49:37  INFO: Character encoding: UTF-8 charset: UTF-8
2016-03-22 07:49:37  INFO: Version: 3.4-SNAPSHOT
2016-03-22 07:49:44  INFO: Starting server...
2016-03-22 07:50:16  INFO: [291BFCAD] connected
2016-03-22 07:50:16 DEBUG: [291BFCAD: 5055 < 41.162.184.164] HEX: 474554202f20485454502f312e310d0a486f73743a203133392e35392e3234392e3232383a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a20746578742f68746d6c2c6170706c69636174696f6e2f7868746d6c2b786d6c2c6170706c69636174696f6e2f786d6c3b713d302e392c696d6167652f776562702c2a2f2a3b713d302e380d0a557067726164652d496e7365637572652d52657175657374733a20310d0a557365722d4167656e743a204d6f7a696c6c612f352e30202857696e646f7773204e542031302e3029204170706c655765624b69742f3533372e333620284b48544d4c2c206c696b65204765636b6f29204368726f6d652f34392e302e323632332e3837205361666172692f3533372e33360d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174652c20736463680d0a4163636570742d4c616e67756167653a20656e2d55532c656e3b713d302e380d0a0d0a
2016-03-22 07:50:16  INFO: [1D7CF89E] connected
2016-03-22 07:50:16 DEBUG: [291BFCAD: 5055 > 41.162.184.164] HEX: 485454502f312e3120323030204f4b0d0a0d0a
2016-03-22 07:50:16  INFO: [291BFCAD] disconnected
2016-03-22 07:50:16  WARN: Referential integrity constraint violation: "FK_POSITION_DEVICEID: PUBLIC.POSITIONS FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.DEVICES(ID) (0)"; SQL statement:
INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes)
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); [23506-191] - JdbcSQLException (... < QueryBuilder:431 < DataManager:306 < DefaultDataHandler:27 < ...)
2016-03-22 07:50:16  INFO: [291BFCAD] id: 0, time: 2016-03-22 07:50:16, lat: 0.00000, lon: 0.00000, speed: 0.0, course: 0.0
2016-03-22 07:50:16 DEBUG: [1D7CF89E: 5055 < 41.162.184.164] HEX: 474554202f66617669636f6e2e69636f20485454502f312e310d0a486f73743a203133392e35392e3234392e3232383a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a557365722d4167656e743a204d6f7a696c6c612f352e30202857696e646f7773204e542031302e3029204170706c655765624b69742f3533372e333620284b48544d4c2c206c696b65204765636b6f29204368726f6d652f34392e302e323632332e3837205361666172692f3533372e33360d0a4163636570743a202a2f2a0d0a526566657265723a20687474703a2f2f3133392e35392e3234392e3232383a353035352f0d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174652c20736463680d0a4163636570742d4c616e67756167653a20656e2d55532c656e3b713d302e380d0a0d0a
2016-03-22 07:50:16 DEBUG: [1D7CF89E: 5055 > 41.162.184.164] HEX: 485454502f312e3120323030204f4b0d0a0d0a
2016-03-22 07:50:16  INFO: [1D7CF89E] disconnected
2016-03-22 07:50:16  WARN: Referential integrity constraint violation: "FK_POSITION_DEVICEID: PUBLIC.POSITIONS FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.DEVICES(ID) (0)"; SQL statement:
INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes)
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); [23506-191] - JdbcSQLException (... < QueryBuilder:431 < DataManager:306 < DefaultDataHandler:27 < ...)
2016-03-22 07:50:16  INFO: [1D7CF89E] id: 0, time: 2016-03-22 07:50:16, lat: 0.00000, lon: 0.00000, speed: 0.0, course: 0.0
2016-03-22 07:52:51  INFO: [D90029C5] connected
2016-03-22 07:52:51 DEBUG: [D90029C5: 5055 < 41.162.184.164] HEX: 474554202f20485454502f312e310d0a486f73743a203133392e35392e3234392e3232383a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a20746578742f68746d6c2c6170706c69636174696f6e2f7868746d6c2b786d6c2c6170706c69636174696f6e2f786d6c3b713d302e392c696d6167652f776562702c2a2f2a3b713d302e380d0a557067726164652d496e7365637572652d52657175657374733a20310d0a557365722d4167656e743a204d6f7a696c6c612f352e30202857696e646f7773204e542031302e3029204170706c655765624b69742f3533372e333620284b48544d4c2c206c696b65204765636b6f29204368726f6d652f34392e302e323632332e3837205361666172692f3533372e33360d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174652c20736463680d0a4163636570742d4c616e67756167653a20656e2d55532c656e3b713d302e380d0a0d0a
2016-03-22 07:52:51 DEBUG: [D90029C5: 5055 > 41.162.184.164] HEX: 485454502f312e3120323030204f4b0d0a0d0a
2016-03-22 07:52:51  INFO: [D90029C5] disconnected
2016-03-22 07:52:51  INFO: [B6327931] connected
2016-03-22 07:52:51  INFO: [41C4A3F2] connected
2016-03-22 07:52:51  WARN: Referential integrity constraint violation: "FK_POSITION_DEVICEID: PUBLIC.POSITIONS FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.DEVICES(ID) (0)"; SQL statement:
INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes)
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); [23506-191] - JdbcSQLException (... < QueryBuilder:431 < DataManager:306 < DefaultDataHandler:27 < ...)
2016-03-22 07:52:51  INFO: [D90029C5] id: 0, time: 2016-03-22 07:52:51, lat: 0.00000, lon: 0.00000, speed: 0.0, course: 0.0
2016-03-22 07:52:51  INFO: [151A9B12] connected
2016-03-22 07:52:51 DEBUG: [41C4A3F2: 5055 < 41.162.184.164] HEX: 474554202f66617669636f6e2e69636f20485454502f312e310d0a486f73743a203133392e35392e3234392e3232383a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a557365722d4167656e743a204d6f7a696c6c612f352e30202857696e646f7773204e542031302e3029204170706c655765624b69742f3533372e333620284b48544d4c2c206c696b65204765636b6f29204368726f6d652f34392e302e323632332e3837205361666172692f3533372e33360d0a4163636570743a202a2f2a0d0a526566657265723a20687474703a2f2f3133392e35392e3234392e3232383a353035352f0d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174652c20736463680d0a4163636570742d4c616e67756167653a20656e2d55532c656e3b713d302e380d0a0d0a
2016-03-22 07:52:51 DEBUG: [41C4A3F2: 5055 > 41.162.184.164] HEX: 485454502f312e3120323030204f4b0d0a0d0a
2016-03-22 07:52:51  INFO: [41C4A3F2] disconnected
bruno9 years ago

Oops, nevermind I followed old instructions and edited the wrong file. Sorry. Mark this as resolved.