Strange problem with establishing connection from devices

Niko Lync2 years ago

Hello, maybe someone from the forum members had a similar problem and will help

I have a problem with connections to Traccar from devices with SIM cards, which connect to the Internet via Internet Breakout - i.e. connections from all devices come from single IP address.

The number of such open connections is around 120, however, there are more devices with such SIMs, but some of them can no longer connect to the socket.

From the log of the Teltonika device you can read:

WARNING @ 1215:failed to establish connection! evt sending: enabled ID:-1 (0) ErrDet:0
ERROR @ m2m_network_api.c(2484):[SOCKET.OPEN.0671] Error: 11
WARNING @ 2893:[ERROR.HANDLER.0671] Caller: 2/socket open, code: 11, type: 2

After a long "knocking-in", the connection is usually established, but in the meantime other devices lose their connection and cannot resume it.

Socket Error: 11 I suppose it may concern me with insufficient resources, but I'm not sure ...

The server is the latest version of Ubuntu and Traccar is also the last version available.
All optimizations regarding the number of open files or simultaneous connections have been set on the server. Looking at the resources used, the server gets bored

top - 19:28:07 up 26 days, 21:02,  1 user,  load average: 0.02, 0.06, 0.02
Tasks: 131 total,   1 running, 130 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.5 us,  0.3 sy,  0.0 ni, 99.0 id,  0.2 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3931.7 total,    112.4 free,   1250.4 used,   2568.9 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   2432.8 avail Mem

There are no errors in the Traccar logs regarding these connections.

BTW. Devices with other SIM cards are also connected to the server, where they connect from other IPs with these devices there are no problems.

After restarting the Traccar service, the devices start to establish connections (first come, first served) up to a certain number and those that do not fit can no longer connect.

It looks like the problem is that a large (if 100 - 150 can be called large...) number of connections are made from single IP address, as if there was any a limit somewhere - but I have no idea how to diagnose it

One might assume that some problem may be with the SIM cards themselves, but this is not the case, however, when in the "currently problematic" device we change the server address to another one, the connection takes place immediately.

jafar habibi2 years ago

it seems like the simcard internet provider has limited number of simultaneous connections

Niko Lync2 years ago

I don't thing so. The number of simultaneous connections from these SIM cards is unlimited. The connection is not made directly. There is Internet Breakout and communication is via two public IP addresses. Blocking simultaneous connections for such service would make no sense at all. These are typical M2M cards where many connections to the server can be made from one public IP address by design.

Baari8 months ago

Did you ever find a solution to this? I am having the same issue.
Only 100 connections from same IP and the sims have the same IP address.
I tested on another server with different software and the about 1200 devices can communicate but with Traccar there is only 100 due to the same IP.

If I run the following command I always get 100 devices. 6013 is the device port.
netstat -anp |grep 6013 |wc -l