Problem in Traccar 3.12 delayed data insertion in database

Anisha Vishnoi6 years ago

Hi Anton,

I have found an issue in traccar as below-

  1. There are entries in log file when my vehicle went on a trip from point A to point B
  2. There are entries in database for this trip but there is time difference between log time and [servertime,devicetime and fixtime]
  3. servertime,devicetime and fixtime are much later then log time.

Log file snippet -

2018-01-23 09:29:58 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 797900709404414c4d313d37353b414c4d323d44353b414c4d333d35463b535441313d34303b4459443d30323b534f533d2c2c3b43454e5445523d3b46454e43453d46656e63652c4f46462c302c302e3030303030302c302e3030303030302c3330302c494e206f72204f55542c313b00826c660d0a
2018-01-23 09:29:59 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170b3b38cd032ca8b007ef33680054db01944601ec005ab60080c3a90d0a78781f121201170b3b39cd032ca8b007ef336800d4db01944601ec005ab60084a2840d0a
2018-01-23 09:29:59 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512007c1b4f0d0a
2018-01-23 09:29:59  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:29:56, lat: 29.58801, lon: 73.95376, speed: 0.0, course: 219.0
2018-01-23 09:29:59 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512007d0ac60d0a
2018-01-23 09:29:59  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:29:57, lat: 29.58801, lon: 73.95376, speed: 0.0, course: 219.0
2018-01-23 09:30:47 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c002fcd032ca6a807ef33300fd4b301944601ec005ab60085c98d0d0a
2018-01-23 09:30:47 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512007e385d0d0a
2018-01-23 09:30:47  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:30:47, lat: 29.58772, lon: 73.95373, speed: 8.1, course: 179.0
2018-01-23 09:30:58 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0039cd032ca3b807ef33300dd4b501944601ec005ab60086cd660d0a
2018-01-23 09:30:58 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512007f29d40d0a
2018-01-23 09:30:58  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:30:57, lat: 29.58730, lon: 73.95373, speed: 7.0, course: 181.0
2018-01-23 09:31:03 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0102cd032ca28007ef32e00fd4d901944601ec005ab60087f5340d0a
2018-01-23 09:31:03 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008026ac0d0a
2018-01-23 09:31:03  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:02, lat: 29.58713, lon: 73.95369, speed: 8.1, course: 217.0
2018-01-23 09:31:05 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0105cd032ca20c07ef31d013d50001944601ec005ab60088a84f0d0a
2018-01-23 09:31:05 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008137250d0a
2018-01-23 09:31:05  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:05, lat: 29.58706, lon: 73.95354, speed: 10.3, course: 256.0
2018-01-23 09:31:16 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c010fcd032ca23807ef2c701ed50f01944601ec005ab60089b63f0d0a
2018-01-23 09:31:16 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008205be0d0a
2018-01-23 09:31:16  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:15, lat: 29.58709, lon: 73.95277, speed: 16.2, course: 271.0
2018-01-23 09:31:26 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0119cd032ca25c07ef25c01fd51001944601ec005ab6008a2cdc0d0a
2018-01-23 09:31:26 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008314370d0a
2018-01-23 09:31:26  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:25, lat: 29.58711, lon: 73.95182, speed: 16.7, course: 272.0
2018-01-23 09:31:33 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0120cd032ca21c07ef21e018d4f101944601ec005c59008b844f0d0a
2018-01-23 09:31:33 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008460880d0a
2018-01-23 09:31:33  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:32, lat: 29.58707, lon: 73.95127, speed: 13.0, course: 241.0
2018-01-23 09:31:35 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0123cd032ca11c07ef21101ad4c701944601ec005c59008c044b0d0a
2018-01-23 09:31:35 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008571010d0a
2018-01-23 09:31:35  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:35, lat: 29.58693, lon: 73.95116, speed: 14.0, course: 199.0
2018-01-23 09:31:46 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c012dcd032c9b0407ef20e825d4b501944601ec005c59008d703c0d0a
2018-01-23 09:31:46 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 787805120086439a0d0a
2018-01-23 09:31:46  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:45, lat: 29.58606, lon: 73.95113, speed: 20.0, course: 181.0
2018-01-23 09:31:56 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0137cd032c943c07ef210826d4b301944601ec005c59008e8e9b0d0a
2018-01-23 09:31:56 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008752130d0a
2018-01-23 09:31:56  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:31:55, lat: 29.58510, lon: 73.95115, speed: 20.5, course: 179.0
2018-01-23 09:32:07 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0205cd032c8d7807ef20f826d4b401944601ec005c59008f379d0d0a
2018-01-23 09:32:07 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 787805120088aae40d0a
2018-01-23 09:32:07  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:32:05, lat: 29.58414, lon: 73.95114, speed: 20.5, course: 180.0
2018-01-23 09:32:16 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c020fcd032c868807ef210827d4b401944601ec005c5900900b7c0d0a
2018-01-23 09:32:16 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 787805120089bb6d0d0a
2018-01-23 09:32:16  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:32:15, lat: 29.58315, lon: 73.95115, speed: 21.1, course: 180.0
2018-01-23 09:32:26 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0219cd032c7f4407ef211029d4b401944601ec005c59009104aa0d0a
2018-01-23 09:32:26 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008a89f60d0a
2018-01-23 09:32:26  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:32:25, lat: 29.58212, lon: 73.95116, speed: 22.1, course: 180.0
2018-01-23 09:32:36 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0223cd032c77e807ef212029d4b401944601ec005c5900928b030d0a
2018-01-23 09:32:36 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008b987f0d0a
2018-01-23 09:32:36  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:32:35, lat: 29.58107, lon: 73.95116, speed: 22.1, course: 180.0
2018-01-23 09:32:46 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c022dcd032c703807ef21202cd4b501944601ec005c590093c6c80d0a
2018-01-23 09:32:46 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008cecc00d0a
2018-01-23 09:32:46  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:32:45, lat: 29.57998, lon: 73.95116, speed: 23.8, course: 181.0
2018-01-23 09:32:56 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0237cc032c683007ef21102dd4b301944601ec005c59009408450d0a
2018-01-23 09:32:56 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008dfd490d0a
2018-01-23 09:32:56  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:32:55, lat: 29.57884, lon: 73.95116, speed: 24.3, course: 179.0
2018-01-23 09:32:58 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78780a13c6060200020095e5470d0a
2018-01-23 09:32:58 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780513008e950e0d0a
2018-01-23 09:32:58  INFO: [AA00DC38] id: 351608085054307, time: 2018-01-23 09:32:55, lat: 29.57884, lon: 73.95116, speed: 24.3, course: 179.0
2018-01-23 09:33:06 DEBUG: [AA00DC38: 5023 < 171.79.247.28] HEX: 78781f121201170c0305cc032c5ff007ef21102fd4b301944601ec005c59009626240d0a
2018-01-23 09:33:06 DEBUG: [AA00DC38: 5023 > 171.79.247.28] HEX: 78780512008fde5b0d0a

and more.....

Anton Tananaev6 years ago

Your log looks fine to me. Where exactly is the problem?

Anisha Vishnoi6 years ago

I could not understand the problem. Is it possible server hangs and insert the data into database when it is ok. As you can see in the logs positions time around 09:30 AM and when I see route report it shows position time around 14:48 and later.

Anton Tananaev6 years ago

From what I can see in the logs, it seems like the time is correct.

Anisha Vishnoi6 years ago

Time in logs is correct but in database time [devicetime,servertime and fixtime] is wrong. Actual time is around 9:30 and in logs it is around 9:30 but in database time is around 14:48.

Anton Tananaev6 years ago

That's not possible. It means that you are looking at different records.

Anisha Vishnoi6 years ago

This data is of my own vehicle and I went from point A to Point B around 9:30 and in the logs it is correct but in database it is showing wrong. Is it possible that there is data in log file and not inserted in database.

Anton Tananaev6 years ago

I suspect the timezone is incorrect somewhere, so you should carefully check everything.

Anisha Vishnoi6 years ago

I didn't change timezone, and it has been working fine since last month. It is working fine today.

Anton Tananaev6 years ago

Well, I don't know how to help you. You need to carefully check everything. You must be missing something somewhere.

kanhaiya6 years ago

Hi Anisha, I am also facing the same problem but have hard luck resolving the same... have you got any resolution