stopped writing to mysqld

Werner8 days ago

however my installation stopped writing the position to the mysql db. web gui was working normally... my problem is that iam missing 1 month of data.
I found out that the server wrote all data to the server.logs. is there any chance to reimport the logs to the db? i tried alread to manually resend test packets to the teltonika port of traccar. but no luck.
which format is written to the log files? raw teltonika packets?

thx for any help!
Werner

Track-trace8 days ago

Better find out the cause first.

Kaloyan Kanev8 days ago

What you mean with: web gui was working normally...
The web UI working with tc_positions from DB. If you not have records the cars will be frozen.

Anton Tananaev8 days ago

You could try this script:

https://github.com/traccar/traccar/blob/master/tools/recover.py

Note that it's very old, so it will almost definitely require some changes.

Werner5 days ago

@Kaloyan Kanev: i have only one car, and every time when i opened the webui it was "online" at my home location. Maybe it was frozen for one month....
@Anton Tananaev: thanks for the tip! With some small modifications the script is working. i can see the incomming trafic in the log. the problem is that the messages could not be decoded.
with: s.send(binascii.unhexlify(message)) i got Warnings: 2024-11-17 12:49:41 WARN: Unknown device - ÊþT ¯ (127.0.0.1) 2024-11-17 12:49:41 INFO: [T942a22dd: teltonika > 127.0.0.1] 00
i tried also:
s.send(message). then the messages format looks ok, but they are also not decoded.

sample logfile entries, which i try to import....

2024-11-12 07:38:44  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0073cafe01ca000f3836373634383034303137363539348e01000001931f189cd80009c4db561cbce13200ac00240b000000ef000d000500ef0000f00100150400c800004501000500b5000800b600060042330900430f6d00440000000300f100005aa100c7000056630010052e87fa0000000001
2024-11-12 07:38:44  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001ca01
2024-11-12 07:39:04  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0073cafe01cb000f3836373634383034303137363539348e01000001931f18eaf80009c4db561cbce13200ac00240a000000f0000d000500ef0000f00000150500c800004501000500b5000800b600060042319000430f6d00440000000300f100005aa100c7000056630010052e87fa0000000001
2024-11-12 07:39:04  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001cb01
2024-11-12 07:39:43  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0076cafe01cc000f3836373634383034303137363539348e01000001931f197f680009c4db561cbce13200ac002409000000fa000e000600ef0000f00000150500c80000450100fa00000500b5000900b600070042323b00430f6d00440000000300f100005aa100c7000056630010052e87fa0000000001
2024-11-12 07:39:43  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001cc01
2024-11-12 07:49:43  INFO: Event id: 867648040176594, time: 2024-11-12 07:49:43, type: deviceUnknown, notifications: 0
2024-11-12 08:00:22  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0129cafe01cd000f3836373634383034303137363539348e03000001931f2b61880009c4e0371cbce45200a2003e0800000000000d000500ef0000f00100150400c800004501000500b5000a00b60008004231e400430f6d00440000000300f100005aa100c7000000000010052e87fa00000000000001931f2b61920009c4e0371cbce45200a2003e08000000f0000d000500ef0000f00100150400c800004501000500b5000a00b60008004231e500430f6d00440000000300f100005aa100c7000000000010052e87fa00000000000001931f2c53b80009c4ddae1cbce0ce00a300d10b000000f0000d000500ef0000f00000150400c800004501000500b5000800b60006004231f900430f7000440000000300f100005aa100c7000000000010052e87fa0000000003
2024-11-12 08:00:22  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001cd03
2024-11-12 08:00:22  INFO: Event id: 867648040176594, time: 2024-11-12 08:00:22, type: deviceOnline, notifications: 0
2024-11-12 08:10:22  INFO: Event id: 867648040176594, time: 2024-11-12 08:10:22, type: deviceUnknown, notifications: 0
2024-11-12 08:10:23  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0129cafe01ce000f3836373634383034303137363539348e03000001931f3479a80009c4dca31cbcdfc400ad01270700000000000d000500ef0000f00100150400c800004501000500b5000c00b6000a004230d900430f6e00440000000300f100005aa100c7000000000010052e87fa00000000000001931f347d900009c4dca31cbcdfc400ad012707000000f0000d000500ef0000f00100150400c800004501000500b5000c00b6000a004230d900430f6e00440000000300f100005aa100c7000000000010052e87fa00000000000001931f356bd80009c4d91f1cbcdf3e00aa00e507000000f0000d000500ef0000f00000150400c800004501000500b5000b00b60009004231de00430f7100440000000300f100005aa100c7000000000010052e87fa0000000003
2024-11-12 08:10:23  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001ce03
2024-11-12 08:10:23  INFO: Event id: 867648040176594, time: 2024-11-12 08:10:23, type: deviceOnline, notifications: 0
2024-11-12 08:20:23  INFO: Event id: 867648040176594, time: 2024-11-12 08:20:23, type: deviceUnknown, notifications: 0
2024-11-12 08:20:24  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0073cafe01cf000f3836373634383034303137363539348e01000001931f3e3da80009c4d91f1cbcdf3e00ba00e507000000ef000d000500ef0100f00000150400c800004501000500b5000d00b6000a004237ce00430f7100440000000300f100005aa100c7000000000010052e87fa0000000001
2024-11-12 08:20:24  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001cf01
2024-11-12 08:20:24  INFO: Event id: 867648040176594, time: 2024-11-12 08:20:24, type: deviceOnline, notifications: 0
2024-11-12 08:22:00  INFO: [U228f5aa8: teltonika < 213.147.165.141] 00cecafe01d0000f3836373634383034303137363539348e02000001931f4039780009c4e4e81cbcec9700de002f0600070000000d000500ef0100f00000150400c800004501000500b5000e00b6000d0042381800430f7100440000000300f100005aa100c7000000000010052e882100000000000001931f4039820009c4e4e81cbcec9700de002f06000700f0000d000500ef0100f00100150400c800004501000500b5000e00b6000d0042381c00430f7100440000000300f100005aa100c7000000000010052e88210000000002
2024-11-12 08:22:00  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001d002
2024-11-12 08:22:01  INFO: [U228f5aa8: teltonika < 213.147.165.141] 00d1cafe01d1000f3836373634383034303137363539348e02000001931f403d600009c4e6461cbcecda00de00440600090000000d000500ef0100f00100150400c800004501000500b5000e00b6000d0042382a00430f7100440000000300f100005aa100c7000000020010052e882300000000000001931f403d6a0009c4e6461cbcecda00de004406000900fa000e000600ef0100f00100150400c80000450100fa01000500b5000e00b6000d0042382800430f7100440000000300f100005aa100c7000000020010052e88230000000002
2024-11-12 08:22:01  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001d102
2024-11-12 08:22:07  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0073cafe01d2000f3836373634383034303137363539348e01000001931f4054d00009c4f37d1cbcefc800de00570600150000000d000500ef0100f00100150400c800004501000500b5002200b60015004237dc00430f7100440000000300f100005aa100c70000001d0010052e883e0000000001
2024-11-12 08:22:07  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001d201
2024-11-12 08:22:20  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0073cafe01d3000f3836373634383034303137363539348e01000001931f408b800009c51ce51cbceebd00db00570b00000000000d000500ef0100f00100150400c800004501000500b5000900b60007004237dc00430f7100440000000300f100005aa100c7000000760010052e88970000000001
2024-11-12 08:22:20  INFO: [U228f5aa8: teltonika > 213.147.165.141] 0005000001d301
2024-11-12 08:22:29  INFO: [U228f5aa8: teltonika < 213.147.165.141] 0073cafe01d4000f3836373634383034303137363539348e01000001

has anybody an tip where the problem is...

many thx in advance!
Werner!

Anton Tananaev5 days ago

Are you sure you're using UDP in the script?

Werner5 days ago

@Anton Tananaev you are my hero!! that did the trick! big thanks!!!