You should probably start by upgrading your server to the latest version.
Upgraded to 4.12, no change in behavior.
Have you configured connection timeouts?
Yes, the following.
<entry key='gt06.timeout'>30</entry>
<entry key='osmand.port'>5055</entry>
<entry key='server.timeout'>180</entry>
<entry key='status.timeout'>120</entry>
I can see a LOT of this messages in log file:
2021-05-03 17:48:13 WARN: [35a5329f] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:13 WARN: [b7dbbaf7] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:13 WARN: [561f603c] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:18 WARN: [dbd69c69] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:18 WARN: [3d70611f] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:18 WARN: [5b8b32f5] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:19 WARN: [a5cf1291] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:19 WARN: [2f7dbac5] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:20 WARN: [284e8184] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:21 WARN: [bbe4877e] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:22 WARN: [2020afa6] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:22 WARN: [7ef05fab] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:22 WARN: [415d5774] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:22 WARN: [bc720fa6] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:23 WARN: [3a60ff85] error - An existing connection was forcibly closed by the remote host - IOException (...)
2021-05-03 17:48:24 WARN: [4fc6405f] error - An existing connection was forcibly closed by the remote host - IOException (...)
I supposed they are from devices connections, but I can't see in the same log a connection first (like [ID] connected):
PS C:\Program Files\Traccar\logs> cat .\tracker-server.log |findstr "bbe4877e"
2021-05-03 17:48:21 WARN: [bbe4877e] error - An existing connection was forcibly closed by the remote host - IOException (...)
PS C:\Program Files\Traccar\logs>
I'm going to take a look with Wireshark on those connections to see where they come from, maybe an attack??
Any help or idea will be appreciated.
An existing connection was forcibly closed by the remote host
This means device force-closed connetion.
That's correct, but I cannot identify origin connection.
Anyway, traccar keeps failing at random periods. The only thing I can detect is a high number in CLOSE_WAIT state connections, a pair of "Aborted connections" in MySQL error an nothing else. Out of ideas.
did you ever get to the bottom of this, also seeing same issue
After a lot analysis, we faced two problems:
1.- devices disconnection: caused by phone operator, nothing to do here unless changing SIM's to 300 devices...
2.- random failures of service, disconnection from database: didn't find the cause, finally created a kind of watchdog program restarting the service when detected stopped.
After some time, that server was migrated to a linux server, and no more problems.
interesting, so you think it was mainly windows issue?
Was is a terminal version of linux you went for or something with an desktop IDE ? which version did you use?
Hi, in our case the problem was generated because our SIM Card was running out of credit
Sorry Quade, I lost your question.
The server was migrated to Amazon Linux 2
Hello imarinkovic, first of all, let me tell you that you made a perfect explanation of the problem and what you did to try to identify the problem.
I currently have exactly the same error and I practically did everything you did without being able to find the cause. I want to ask you clearly: was this completely solved by migrating your server to Linux? If so, could you recommend the exact version of Linux and MySQL that you used? Thank you very much, I am looking forward to reading your response.
Hi Datasoft, greetings from Chile.
Yes, the problem was completely gone after migration to linux server; in this case we used a Amazon Linux 2 server, but in my experience, any linux flavor is completely capable of run tracer without a problem.
Thank you very much for your response, really thank you very much, I was going crazy with this topic. Greetings from Colombia, I hope we can contact each other to share about Traccar, which for me is simply one of the best GPS tracking projects.
Hello friends, I have the following problem to solve, but I already ran out of ideas:
Problem: in random periods of time, Traccar stops processing messages received from the GPS (different brands and models, in total about 200 devices), the traccar log simply stops being written and only logins to the web interface are observed. It is observed in the web interface that the devices begin to appear in the "Unknown" state gradually until they are all in that state. Some times keeps runnig hours, some time just 20 minutes.
Analysis performed: I have gone through different layers of analysis, going through
I applied a monitoring software to perform some correlations, finding the following:
Aborted connection 31 to db: 'traccar' user: 'traccar' host: '127.0.0.1' (Got an error reading communication packets)
1 hour detail
24 hour detail
What have I done?
I have modified Windows network parameters like TcpTimedWaitDelay, MaxUserPort
Modified timeouts from traccar (server, status, gt06)
I'm already completely lost about it. Any ideas?
Relevant debug just before stop receiving data