error - Connection reset - SocketException

Hello I have traccar 5.5 installed on a digital ocean vps and I have followed the instructions in the documentation for Secure Connection
Sometimes I have 200 devices online and I receive the following warning in the logs file and the devices start to be in unknown state

2023-01-04 16:15:08  INFO: [T405b8aca] error - Connection reset - SocketException (...)
2023-01-04 16:15:08  INFO: [T405b8aca] disconnected
2023-01-04 16:15:09  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 16:15:09  INFO: [Tb4c4ec88: teltonika < 186.11.61.233] 000000000000005b8e01000001857d909af800d552ba36ebf8c484002c00011200000000000d000600ef0100f00100150500c80000450100b300000500b5000900b6000500426ee200430fbd00440000000200f100011d2900100302242b00000000010000d2ab
2023-01-04 16:15:09  INFO: [Tb4c4ec88: teltonika > 186.11.61.233] 00000001
2023-01-04 16:15:09  INFO: [Tb4c4ec88] id: 860896050268432, time: 2023-01-04 16:15:07, lat: -33.60183, lon: -71.59987, course: 1.0

This warn alert appears in the logs approximately every 6 times per minute and I would like to know if the unknown status of the devices is due to this alert

Anton Tananaev2 years ago

The warning has nothing to do with any devices or device state. It just means that some user it trying to connect to the WebSocket without a valid session.

I understand, I'll keep looking for the origin of what the problem is, thanks

it has happened again and it is the only warn that appears in the logs file

2023-01-04 18:56:06  INFO: [T28a42434: gps103 > 191.126.159.166] 4c4f4144
2023-01-04 18:56:06  INFO: [Tde6bcd65: gl200 < 186.11.60.153] 2b524553503a47544652492c3530303130312c3836383537343034303433373138332c2c2c31302c312c312c302e302c3130342c36372e322c2d37312e3539333830372c2d33332e3534373835322c32303233303130343138343931322c303733302c303030312c373732412c353241313345352c30302c302e302c2c2c2c3130302c3131303030302c2c2c2c32303233303130343138353230322c3236374124
2023-01-04 18:56:06  INFO: [Tde6bcd65] id: 868574040437183, time: 2023-01-04 18:49:12, lat: -33.54785, lon: -71.59381, course: 104.0
2023-01-04 18:56:06  INFO: [Tc3b51023: gl200 < 95.126.123.60] 2b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31312c312c312c33392e322c3235352c342e302c2d37312e3539383837342c2d33332e3534313538312c32303233303130343138343731362c303733302c303030322c344533312c3733363133352c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343730302c46453242242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31302c312c312c33302e332c3234352c2d322e382c2d37312e3630303438392c2d33332e3534313933332c32303233303130343138343733312c303733302c303030322c344533312c3733363133352c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343732332c46453243242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31302c312c312c32342e332c3233302c2d372e342c2d37312e3630323137302c2d33332e3534323633302c32303233303130343138343734392c303733302c303030322c344533312c3733363133352c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343733362c46453244242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31312c312c312c32322e372c3230372c2d372e382c2d37312e3630323238362c2d33332e3534323736372c32303233303130343138343735322c303733302c303030322c344533312c3733363133352c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343733362c46453245242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31302c312c312c32342e312c3139302c2d362e352c2d37312e3630323836362c2d33332e3534333835332c32303233303130343138343831302c303733302c303030322c344533312c3733363133372c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343830332c46453246242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31302c312c312c302e302c3138352c2d352e322c2d37312e3630323931382c2d33332e3534343133382c32303233303130343138343833312c303733302c303030322c344533312c3733363133372c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343832332c46453330242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31312c312c312c31312e372c3135342c2d352e322c2d37312e3630323936362c2d33332e3534343531312c32303233303130343138343834362c303733302c303030322c344533312c3733363133372c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343833302c46453331242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31302c312c312c31312e392c33332c2d362e332c2d37312e3630323839332c2d33332e3534343438382c32303233303130343138343834392c303733302c303030322c344533312c3733363133372c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343833362c46453332242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31312c312c312c31382e392c322c2d372e352c2d37312e3630323838382c2d33332e3534343337342c32303233303130343138343835322c303733302c303030322c344533312c3733363133372c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343833362c46453333242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31302c312c312c31362e362c32322c2d382e382c2d37312e3630323732302c2d33332e3534333531302c32303233303130343138343931302c303733302c303030322c344533312c3733363133372c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343930332c46453334242b524553503a47544652492c3530303130312c3836383537343034303432323032392c2c2c31312c312c312c32342e342c33312c2d31302e302c2d37312e3630323239332c2d33332e3534323739332c32303233303130343138343932352c303733302c303030322c344533312c3733363133372c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343930392c46453335242b425546463a47544652492c3530303130312c3836383537343034303432323032392c2c2c31302c312c312c33322e342c3237352c2d372e322c2d37312e3539333935312c2d33332e3533363932352c32303233303130343138343631302c303733302c303030322c344533312c3733363139312c30302c302e302c2c2c2c39372c3232303130302c2c2c2c32303233303130343138343535372c46453234242b425546463a47544652492c3530303130312c3836383537343034303432323032392c2c2c31312c312c312c372e352c3237392c2d372e332c2d37312e3539343132332c2d33332e3533363930372c32303233303130343138343631332c303733302c303030322c344533312c3733363139312c30302c302e302c2c2c2c39372c3232303130
2023-01-04 18:56:16  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:56:25  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:56:28  INFO: user: 173, action: login, from: 186.11.98.5
2023-01-04 18:56:39  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:56:39  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:57:16  INFO: user: 94, action: login, from: 34.192.202.206
2023-01-04 18:57:16  INFO: user: 347, action: login, from: 34.192.202.206
2023-01-04 18:57:18  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:57:24  INFO: [T0478751d] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:50 < NotificationManager:110 < ...)
2023-01-04 18:57:27  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:57:41  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:57:41  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:58:17  INFO: [Tfec34de5] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:50 < NotificationManager:110 < ...)
2023-01-04 18:58:20  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:58:29  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:58:43  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:58:43  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:59:05  INFO: [Tafd0c93e] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:50 < NotificationManager:110 < ...)
2023-01-04 18:59:15  INFO: user: 94, action: login, from: 34.192.202.206
2023-01-04 18:59:16  INFO: user: 347, action: login, from: 34.192.202.206
2023-01-04 18:59:23  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:59:31  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:59:45  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 18:59:45  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:00:06  INFO: [Tc3b51023] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:50 < NotificationManager:110 < ...)
2023-01-04 19:00:25  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:00:28  INFO: login failed from: 207.248.205.89
2023-01-04 19:00:33  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:00:47  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:00:47  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:01:16  INFO: user: 94, action: login, from: 34.192.202.206
2023-01-04 19:01:17  INFO: user: 347, action: login, from: 34.192.202.206
2023-01-04 19:01:25  INFO: [T0478751d] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:50 < NotificationManager:110 < ...)
2023-01-04 19:01:27  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:01:35  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:01:49  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:01:50  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)
2023-01-04 19:02:18  INFO: [Tfec34de5] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:50 < NotificationManager:110 < ...)
2023-01-04 19:02:29  WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)

I don't know what else I can provide

Anton Tananaev2 years ago

These errors are the relevant ones:

[Tfec34de5] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:50 < NotificationManager:110 < ...)
Anton Tananaev2 years ago

Your SMS API seems to be broken.

I understand thanks, I'll keep looking

I have SMS notifications for clients and I have noticed that multiple notifications are generated for the same, I will attach a video, there are times when more than 10 notifications are generated for the same, this will clearly cause it to collapse

multiple video notifications

Video

assigned notifications

image 1

image 2

I have reviewed the logs at that time and the video device has no records

Another background is that I come from traccar 4.10, I have verified and traccar has automatically created everything in the database

These notifications are issued from the moment the vehicle starts, the position is not updated until the vehicle is turned off, but at that moment the notifications are issued in the same way

Anton Tananaev2 years ago

Multiple events is a completely different issue:

https://github.com/traccar/traccar/issues/5000