Commands queueing when device is online

socstur6 years ago

ok thanks. Will report back what I find.

socstur6 years ago

Hi Anton,
Please see a condensed log below pointing to possible root cause of this issue of active devices being removed from active device list.
Starting from 02:26:04 multiple channels are open by the platform from the same device. Strangely they also have the same device IP address. Which tells me device is not disconnecting and reconnecting.

Now the issue occurs when it starts closing each of these channels and leaves one. The last channel it closes results in the platform removing the device id from the active devices list. At that moment that particular device is removed from active devices list but there is still one active channel not closed.
Do you have any way to not have multiple channels open to the same device? ie. if a channel opens to a device traccar should automatically close the old channel. Thanks for your support on this issue.

2018-04-23 00:56:50  INFO: [1C44B86C] connected
2018-04-23 00:56:50 DEBUG: [[1C44B86C] ] Device id:3983 is added to active devices list
2018-04-23 01:47:04  INFO: [42C03888] disconnected
2018-04-23 02:26:04  INFO: [42E12E3C] connected
2018-04-23 02:26:04  INFO: [7558BE27] connected
2018-04-23 02:26:05  INFO: [53E4D028] connected
2018-04-23 02:26:05  INFO: [23BB86A1] connected
2018-04-23 02:26:05  INFO: [8DD99136] connected
2018-04-23 02:26:05  INFO: [28837F3B] connected
2018-04-23 02:26:05  INFO: [973DCB3D] connected
2018-04-23 02:26:05  INFO: [08606C8E] connected
2018-04-23 02:26:05  INFO: [95FBC2B6] connected
2018-04-23 02:26:05  INFO: [E4B032E4] connected
2018-04-23 02:26:05  INFO: [FAD970AF] connected
2018-04-23 02:26:05  INFO: [97CBEC90] connected
2018-04-23 02:26:05  INFO: [3F92A4C4] connected
2018-04-23 02:26:05  INFO: [106B9B17] connected
2018-04-23 02:26:05  INFO: [478B4B6D] connected
2018-04-23 02:26:05  INFO: [69752A14] connected
2018-04-23 02:26:05  INFO: [CE7D875B] connected
2018-04-23 02:26:05  INFO: [9FDB401D] connected
2018-04-23 02:26:05  INFO: [1C44B86C] disconnected
2018-04-23 02:26:05 DEBUG: [[1C44B86C] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:07 DEBUG: [[106B9B17] ] Device id:3983 is added to active devices list
2018-04-23 02:26:07  INFO: [106B9B17] disconnected
2018-04-23 02:26:07 DEBUG: [[106B9B17] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:08 DEBUG: [[69752A14] ] Device id:3983 is added to active devices list
2018-04-23 02:26:08  INFO: [69752A14] disconnected
2018-04-23 02:26:08 DEBUG: [[69752A14] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:08 DEBUG: [[95FBC2B6] ] Device id:3983 is added to active devices list
2018-04-23 02:26:08  INFO: [95FBC2B6] disconnected
2018-04-23 02:26:08 DEBUG: [[95FBC2B6] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:09 DEBUG: [[9FDB401D] ] Device id:3983 is added to active devices list
2018-04-23 02:26:09  INFO: [9FDB401D] disconnected
2018-04-23 02:26:09 DEBUG: [[9FDB401D] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:09 DEBUG: [[08606C8E] ] Device id:3983 is added to active devices list
2018-04-23 02:26:09  INFO: [08606C8E] disconnected
2018-04-23 02:26:09 DEBUG: [[08606C8E] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:11 DEBUG: [[FAD970AF] ] Device id:3983 is added to active devices list
2018-04-23 02:26:11  INFO: [FAD970AF] disconnected
2018-04-23 02:26:11 DEBUG: [[FAD970AF] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:11 DEBUG: [[E4B032E4] ] Device id:3983 is added to active devices list
2018-04-23 02:26:11  INFO: [E4B032E4] disconnected
2018-04-23 02:26:11 DEBUG: [[E4B032E4] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:11 DEBUG: [[28837F3B] ] Device id:3983 is added to active devices list
2018-04-23 02:26:11  INFO: [28837F3B] disconnected
2018-04-23 02:26:11 DEBUG: [[28837F3B] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:12 DEBUG: [[97CBEC90] ] Device id:3983 is added to active devices list
2018-04-23 02:26:12  INFO: [97CBEC90] disconnected
2018-04-23 02:26:12 DEBUG: [[97CBEC90] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:16 DEBUG: [[42E12E3C] ] Device id:3983 is added to active devices list
2018-04-23 02:26:16  INFO: [42E12E3C] disconnected
2018-04-23 02:26:16 DEBUG: [[42E12E3C] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:16 DEBUG: [[23BB86A1] ] Device id:3983 is added to active devices list
2018-04-23 02:26:16  INFO: [23BB86A1] disconnected
2018-04-23 02:26:16 DEBUG: [[23BB86A1] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:18 DEBUG: [[973DCB3D] ] Device id:3983 is added to active devices list
2018-04-23 02:26:18  INFO: [973DCB3D] disconnected
2018-04-23 02:26:18 DEBUG: [[973DCB3D] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:22 DEBUG: [[3F92A4C4] ] Device id:3983 is added to active devices list
2018-04-23 02:26:27 DEBUG: [[CE7D875B] ] Device id:3983 is added to active devices list
2018-04-23 02:26:27  INFO: [CE7D875B] disconnected
2018-04-23 02:26:27 DEBUG: [[CE7D875B] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:27 DEBUG: [[7558BE27] ] Device id:3983 is added to active devices list
2018-04-23 02:26:27  INFO: [7558BE27] disconnected
2018-04-23 02:26:27 DEBUG: [[7558BE27] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:28 DEBUG: [[8DD99136] ] Device id:3983 is added to active devices list
2018-04-23 02:26:28  INFO: [8DD99136] disconnected
2018-04-23 02:26:28 DEBUG: [[8DD99136] ] Device id 3983 is removed from active devices list
2018-04-23 02:26:29 DEBUG: [[478B4B6D] ] Device id:3983 is added to active devices list
2018-04-23 02:26:29 DEBUG: [[53E4D028] ] Device id:3983 is added to active devices list
2018-04-23 02:26:29  INFO: [53E4D028] disconnected
2018-04-23 02:26:29  INFO: [478B4B6D] disconnected
2018-04-23 02:26:29 DEBUG: [[53E4D028] ] Device id 3983 is removed from active devices list
Anton Tananaev6 years ago

Why does your device open some many simultaneous connections? It seems to me there is some serious problem on the device side.

socstur6 years ago

Hi Anton,
I agree, but how does traccar determine whether its a new connection or old connection from a device? is it based on login data sent by the device?

Regards,

socstur6 years ago

And..is there anything I can do on the server side to ignore any new connections from device when old one is still alive?

Anton Tananaev6 years ago

Traccar always takes the latest connection, which is what makes sense when trackers function normally.

socstur6 years ago

what about closing out old one before accepting new one?

Anton Tananaev6 years ago

Traccar doesn't close connections.

socstur6 years ago

Any way to handle this issue on the server side? Even a device having two open connections can cause this problem for traccar. And I have seen multiple times where device will not close old connection and open a new one.

Anton Tananaev6 years ago

You are mistaken. If device doesn't close old connection it's NOT a problem.

socstur6 years ago

But when old connection is eventually closed by device traccar removes the device from active devices which is causing the problem.

Anton Tananaev6 years ago

No, it doesn't.

socstur6 years ago

That’s what the log I have seem to indicate. Everytime a connection is closed the device is removed from active devices. I have detailed log of this happening if you want to see it.

Anton Tananaev6 years ago

Traccar only removes active device if it's LATEST connection. I got a bit tired of arguing with you.

keith siilats6 years ago

Can you post the log lines you added on ConnectionManager. I can run the server in debugger need to fix it too. GL200 units.