GTS database doesn't get eventdata

Chris100148 years ago

I use gts 2.5.8

Anton Tananaev8 years ago

Configuration looks correct. Have you checked logs for any error messages?

Chris100148 years ago

In the log is written "unknown device". But the imeiNumber is listed in the database table Device.

Anton Tananaev8 years ago

If you see "Unknown device" message, it means that Traccar couldn't find device in the database. Possibly there is some issue with database connection or query.

Chris100148 years ago

Do you have any idea or experience what the issue could be? My logfile looks like below. In the wrapper log are an entry belonging to h2 database. Is this a hint thats something wrong with the integration of my gts db?

root@v81017:/opt/traccar/logs# less tracker-server.log
2016-05-26 13:06:46  INFO: Operating system name: Linux version: 3.2.41-042stab113.21 architecture: amd64
2016-05-26 13:06:46  INFO: Java runtime name: Java HotSpot(TM) 64-Bit Server VM vendor: Oracle Corporation version: 24.76-b04
2016-05-26 13:06:46  INFO: Memory limit heap: 27234mb non-heap: 130mb
2016-05-26 13:06:46  INFO: Character encoding: UTF-8 charset: UTF-8
2016-05-26 13:06:46  INFO: Version: 3.5-SNAPSHOT
2016-05-26 13:06:50  INFO: Starting server...
2016-05-26 13:07:20  INFO: [19F3ACA4] connected
2016-05-26 13:07:21 DEBUG: [19F3ACA4: 5050 < 80.187.100.113] HEX: 233031333934393030383839313831372c434d442d462c412c444154453a3136303532362c54494d453a3131303435342c4c41543a35302e303833363738334e2c4c4f543a3030382e34333138313333452c53706565643a3030302e302c302d302d302d302d38372d32302c3030302c32363230312d313934442d3935313923
2016-05-26 13:07:21  WARN: Unknown device - 013949008891817 (80.187.100.113)
2016-05-26 13:07:23 DEBUG: [19F3ACA4: 5050 < 80.187.100.113] HEX: 233031333934393030383839313831372c434d442d542c412c444154453a3136303532362c54494d453a3130343535382c4c41543a35302e303833383230304e2c4c4f543a3030382e34333137333833452c53706565643a3030302e302c302d302d302d302d38382d32312c3030302c32363230312d313934442d3935313923
2016-05-26 13:07:23  WARN: Unknown device - 013949008891817 (80.187.100.113)
2016-05-26 13:07:27 DEBUG: [19F3ACA4: 5050 < 80.187.100.113] HEX: 233031333934393030383839313831372c434d442d542c412c444154453a3136303532362c54494d453a3130343633302c4c41543a35302e303833383033334e2c4c4f543a3030382e34333137333530452c53706565643a3030322e302c302d302d302d312d38382d32312c3238382c32363230312d313934442d3935313923
root@v81017:/opt/traccar/logs# less wrapper.log.20160526
STATUS | wrapper  | 2016/05/26 13:06:45 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2016/05/26 13:06:45 | Java Service Wrapper Community Edition 64-bit 3.5.28
STATUS | wrapper  | 2016/05/26 13:06:45 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/05/26 13:06:45 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/05/26 13:06:45 |
STATUS | wrapper  | 2016/05/26 13:06:46 | Launching a JVM...
INFO   | jvm 1    | 2016/05/26 13:06:46 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/05/26 13:06:46 | [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
INFO   | jvm 1    | 2016/05/26 13:06:46 | [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/05/26 13:06:47 | INFO 5/26/16 1:06 PM: liquibase: Clearing database change log checksums
INFO   | jvm 1    | 2016/05/26 13:06:48 | INFO 5/26/16 1:06 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/05/26 13:06:48 | INFO 5/26/16 1:06 PM: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG
INFO   | jvm 1    | 2016/05/26 13:06:48 | INFO 5/26/16 1:06 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/05/26 13:06:48 | INFO 5/26/16 1:06 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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/05/26 13:06:49 | INFO 5/26/16 1:06 PM: 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 108ms
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Table groups created
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Table user_group created
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Foreign key constraint added to user_group (userid)
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Foreign key constraint added to user_group (groupid)
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Columns groupid(INT) added to devices
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Column users.language dropped
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Column server.language dropped
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Null constraint dropped from users.map
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Default value dropped from users.map
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Null constraint dropped from users.distanceunit
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Default value dropped from users.distanceunit
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Null constraint dropped from users.speedunit
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Default value dropped from users.speedunit
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Columns twelvehourformat(BOOLEAN) added to users
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: Columns twelvehourformat(BOOLEAN) added to server
INFO   | jvm 1    | 2016/05/26 13:06:49 | INFO 5/26/16 1:06 PM: liquibase: /opt/traccar/data/changelog-master.xml: /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author: ChangeSet /opt/traccar/data/changelog-3.5.xml::changelog-3.5::author ran successfully in 131ms
INFO   | jvm 1    | 2016/05/26 13:06:50 | INFO 5/26/16 1:06 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/05/26 13:06:50 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1dnwq4h9g1tos5us2tl8bo|7c865651, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.h2.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1dnwq4h9g1tos5us2tl8bo|7c865651, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:h2:/opt/traccar/data/database, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
INFO   | jvm 1    | 2016/05/26 13:06:50 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.util.log - Logging initialized @3902ms
INFO   | jvm 1    | 2016/05/26 13:06:50 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.Server - jetty-9.2.15.v20160210
INFO   | jvm 1    | 2016/05/26 13:06:51 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@7e0c6ed8{/api,null,AVAILABLE}
INFO   | jvm 1    | 2016/05/26 13:06:51 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@a5c7c18{HTTP/1.1}{0.0.0.0:8082}
INFO   | jvm 1    | 2016/05/26 13:06:51 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.Server - Started @5624ms
STATUS | wrapper  | 2016/05/26 13:37:27 | TERM trapped.  Shutting down.
Chris100148 years ago

I deleted some invalid imei Numbers in my database. Now I got these warnings in traccar.log:

2016-05-26 23:49:35  INFO: [0B801F37] connected
2016-05-26 23:49:37 DEBUG: [0B801F37: 5050 < 80.187.110.27] HEX: 233031333934393030383839313831372c434d442d462c412c444154453a3136303532362c54494d453a3231343634382c4c41543a35302e303833383333334e2c4c4f543a3030382e34333138373136452c53706565643a3030302e302c302d302d302d302d38332d32332c3030302c32363230312d313934442d4236383523
2016-05-26 23:49:37  INFO: Query not provided: database.updateDeviceStatus
2016-05-26 23:49:37  WARN: [0B801F37] error - NullPointerException (ConnectionManager:115 < BaseProtocolDecoder:104 < ExtendedObjectDecoder:60 < ...)
2016-05-26 23:49:37  INFO: [0B801F37] disconnected
2016-05-26 23:49:37  INFO: Query not provided: database.updateDeviceStatus
2016-05-26 23:49:37  WARN: [0B801F37] error - NullPointerException (ConnectionManager:115 < *:71 < MainEventHandler:73 < ... < ExtendedObjectDecoder:53 < ...)
Anton Tananaev8 years ago
Chris100148 years ago

Thank you so much for your support and help.

I copied the file on my server and did #java -jar tracker-server.jar After that I restarted Traccar. Unfortunatly I've got same failure like before. A Part of tracker-server.log below. The HEX shows the correct device and location. But still no communication with my database.

2016-05-27 13:59:44  INFO: Starting server...
2016-05-27 14:00:23  INFO: [F1125BE0] connected
2016-05-27 14:00:25 DEBUG: [F1125BE0: 5050 < 80.187.100.253] HEX: 233031333934393030383839313831372c434d442d462c412c444154453a3136303532362c54494d453a3232313334322c4c41543a35302e303833373030304e2c4c4f543a3030382e34333138343136452c53706565643a3030302e312c302d302d302d302d38332d32332c3030302c32363230312d313934442d4236383623
2016-05-27 14:00:26  INFO: Query not provided: database.updateDeviceStatus
2016-05-27 14:00:26  WARN: [F1125BE0] error - NullPointerException (ConnectionManager:115 < BaseProtocolDecoder:104 < ExtendedObjectDecoder:60 < ...)
2016-05-27 14:00:26  INFO: [F1125BE0] disconnected
2016-05-27 14:00:26  INFO: Query not provided: database.updateDeviceStatus
2016-05-27 14:00:26  WARN: [F1125BE0] error - NullPointerException (ConnectionManager:115 < *:71 < MainEventHandler:73 < ... < ExtendedObjectDecoder:53 < ...)
Anton Tananaev8 years ago

Where did you copy the file? And why did you run "java -jar ..."?

Chris100148 years ago

I tried further more. The connection to the db must be established, because if I delete my device from db it is shown in the log as "unknown device" and if I write it to the db again, this error message doesn't come anymore. But traccar writes no data into the db.
What means
"2016-05-27 14:00:26 INFO: Query not provided: database.updateDeviceStatus" ?
Is there a QUERY missing?

Chris100148 years ago

I thought this was right. I copied it to my home dir where I also had traccar.run. What would be correct?

Anton Tananaev8 years ago

You need to replace the file in the Traccar folder. You don't need to execute it manually.

Chris100148 years ago

Ok, so I did it wrong. No wonder that it didn't work.
Meanwhile I installed the older version of traccar again, and now it seams to work again. I will use traccar next weekend for sportstracking. So until then I won't touch my running system again. But after that event I will try to install traccar 3.5 together with the new tracker-server.jar again and I will come back to you to tell you if it then works or not.

Thank you again so much for your patient support and advice you give to me even if I'm not a specialist as you could realise. Traccar is a great project!

Chris100148 years ago

... the only thing I'm missing now is the "address" in the database. It isn't transfered. Anything else is ok.

Anton Tananaev8 years ago

What geocoder provider are you using?