Version 4.1: Updates are applied to wrong device id

Stefan Herb5 years ago

I have yesterday updatet to v4.1.
I have made a fresh install. I am use the mariadb 10.0.37 on debian 8 (jessie)
But here is a problem for update the right device id with the new traccar server version.
Until yesterday i have used the version 3.17 on the same system and database. In the old version, this problem did not exist.

Here ist the log from today.
The device with id 907438 is frequently updatet.
But on every second request the server update the wrong device (with id 912152) with data from device with id 907438. The other device have currently no update send and ist offline.
After every HEX line i have put the request, decodet with your HEX-DECODER.
You see, here are only updates from id 907438.
But on line with INFO: [41085440] and INFO: [41085440] the server make a update on device 912152

2018-11-08 11:54:48 INFO: [9c6021eb: 5055 < 0:0:0:0:0:0:0:1] HEX: 504f5354202f3f69643d3930373433382674696d657374616d703d31353431363734343930266c61743d34382e31333935373138266c6f6e3d31312e353533373232342673706565643d302e302662656172696e673d302e3026616c7469747564653d3537372e302661636375726163793d32302e33393939393936313835333032373326626174743d38342e3020485454502f312e310d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f696420382e302e303b20534d2d4135323046204275696c642f5231364e57290d0a4163636570742d456e636f64696e673a20677a69700d0a582d466f727761726465642d466f723a203139342e3131332e34302e33340d0a582d466f727761726465642d486f73743a20747261636361722e6970326e65742e64650d0a582d466f727761726465642d5365727665723a20747261636361722e6970326e65742e64650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
---> POST /?id=907438×tamp=1541674490&lat=48.1395718&lon=11.5537224&speed=0.0&bearing=0.0&altitude=577.0&accuracy=20.399999618530273&batt=84.0 HTTP/1.1
2018-11-08 11:54:48 INFO: [9c6021eb: 5055 > 0:0:0:0:0:0:0:1] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2018-11-08 11:54:48 INFO: [9c6021eb] id: 907438, time: 2018-11-08 11:54:50, lat: 48.13957, lon: 11.55372, course: 0.0, accuracy: 20.4
2018-11-08 11:56:48 INFO: [41085440: 5055 < 0:0:0:0:0:0:0:1] HEX: 504f5354202f3f69643d3930373433382674696d657374616d703d31353431363734363130266c61743d34382e31333935373138266c6f6e3d31312e353533373232342673706565643d302e302662656172696e673d302e3026616c7469747564653d3537372e302661636375726163793d32332e36303030303033383134363937323726626174743d38342e3020485454502f312e310d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f696420382e302e303b20534d2d4135323046204275696c642f5231364e57290d0a4163636570742d456e636f64696e673a20677a69700d0a582d466f727761726465642d466f723a203139342e3131332e34302e33340d0a582d466f727761726465642d486f73743a20747261636361722e6970326e65742e64650d0a582d466f727761726465642d5365727665723a20747261636361722e6970326e65742e64650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
---> POST /?id=907438×tamp=1541674610&lat=48.1395718&lon=11.5537224&speed=0.0&bearing=0.0&altitude=577.0&accuracy=23.600000381469727&batt=84.0 HTTP/1.1
2018-11-08 11:56:48 INFO: [41085440: 5055 > 0:0:0:0:0:0:0:1] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2018-11-08 11:56:48 INFO: [41085440] id: 912152, time: 2018-11-08 11:56:50, lat: 48.13957, lon: 11.55372, course: 0.0, accuracy: 23.6
2018-11-08 11:58:58 INFO: [9c6021eb: 5055 < 0:0:0:0:0:0:0:1] HEX: 504f5354202f3f69643d3930373433382674696d657374616d703d31353431363734373430266c61743d34382e31333935373138266c6f6e3d31312e353533373232342673706565643d302e302662656172696e673d302e3026616c7469747564653d3537372e302661636375726163793d32302e33393939393936313835333032373326626174743d38342e3020485454502f312e310d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f696420382e302e303b20534d2d4135323046204275696c642f5231364e57290d0a4163636570742d456e636f64696e673a20677a69700d0a582d466f727761726465642d466f723a203139342e3131332e34302e33340d0a582d466f727761726465642d486f73743a20747261636361722e6970326e65742e64650d0a582d466f727761726465642d5365727665723a20747261636361722e6970326e65742e64650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
---> POST /?id=907438×tamp=1541674740&lat=48.1395718&lon=11.5537224&speed=0.0&bearing=0.0&altitude=577.0&accuracy=20.399999618530273&batt=84.0 HTTP/1.1
2018-11-08 11:58:58 INFO: [9c6021eb: 5055 > 0:0:0:0:0:0:0:1] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2018-11-08 11:58:58 INFO: [9c6021eb] id: 907438, time: 2018-11-08 11:59:00, lat: 48.13957, lon: 11.55372, course: 0.0, accuracy: 20.4
2018-11-08 12:01:11 INFO: [41085440: 5055 < 0:0:0:0:0:0:0:1] HEX: 504f5354202f3f69643d3930373433382674696d657374616d703d31353431363734383733266c61743d34382e31333935373138266c6f6e3d31312e353533373232342673706565643d302e302662656172696e673d302e3026616c7469747564653d3537372e302661636375726163793d32302e33393939393936313835333032373326626174743d38342e3020485454502f312e310d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f696420382e302e303b20534d2d4135323046204275696c642f5231364e57290d0a4163636570742d456e636f64696e673a20677a69700d0a582d466f727761726465642d466f723a203139342e3131332e34302e33340d0a582d466f727761726465642d486f73743a20747261636361722e6970326e65742e64650d0a582d466f727761726465642d5365727665723a20747261636361722e6970326e65742e64650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
---> POST /?id=907438×tamp=1541674873&lat=48.1395718&lon=11.5537224&speed=0.0&bearing=0.0&altitude=577.0&accuracy=20.399999618530273&batt=84.0 HTTP/1.1
2018-11-08 12:01:11 INFO: [41085440: 5055 > 0:0:0:0:0:0:0:1] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2018-11-08 12:01:11 INFO: [41085440] id: 912152, time: 2018-11-08 12:01:13, lat: 48.13957, lon: 11.55372, course: 0.0, accuracy: 20.4
2018-11-08 12:03:11 INFO: [b9da19b6: 5055 < 0:0:0:0:0:0:0:1] HEX: 504f5354202f3f69643d3930373433382674696d657374616d703d31353431363734393933266c61743d34382e31333935373138266c6f6e3d31312e353533373232342673706565643d302e302662656172696e673d302e3026616c7469747564653d3537372e302661636375726163793d32302e33393939393936313835333032373326626174743d38342e3020485454502f312e310d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f696420382e302e303b20534d2d4135323046204275696c642f5231364e57290d0a4163636570742d456e636f64696e673a20677a69700d0a582d466f727761726465642d466f723a203139342e3131332e34302e33340d0a582d466f727761726465642d486f73743a20747261636361722e6970326e65742e64650d0a582d466f727761726465642d5365727665723a20747261636361722e6970326e65742e64650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
---> POST /?id=907438×tamp=1541674993&lat=48.1395718&lon=11.5537224&speed=0.0&bearing=0.0&altitude=577.0&accuracy=20.399999618530273&batt=84.0 HTTP/1.1
2018-11-08 12:03:11 INFO: [b9da19b6: 5055 > 0:0:0:0:0:0:0:1] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2018-11-08 12:03:11 INFO: [b9da19b6] id: 907438, time: 2018-11-08 12:03:13, lat: 48.13957, lon: 11.55372, course: 0.0, accuracy: 20.4

Greetings
Stefan

Anton Tananaev5 years ago

You are using wrong port. For OsmAnd you should be using port 5055.

Stefan Herb5 years ago

Thank you for your answer.
I'm using port 5055 (See logs). Or where do you see the use of a different port?

Anton Tananaev5 years ago

You are not. You are using proxy.

Stefan Herb5 years ago

Yes, right!
Here is a proxy config in my vhost.
This configuration works for over a year with the previous versions of Traccar. Until version 3.17

Anton Tananaev5 years ago

There is a problem in 4.1 that treats HTTP requests from same connection as the same device. It will be fixed in the next release. For now you can use a configuration parameter to device ignore session cache.

Stefan Herb5 years ago

Ok, thank you!
I will try and post the result here.

Stefan Herb5 years ago

I have now added the config parameter <entry key='decoder.ignoreSessionCache'>true</entry> to the traccar.conf.
With this configuration it seems to work.
The devices perform only an update to their own id.
Thanks for your support.