Reputation: 398
I have a problem with the mqtt broker made with aedes.js (v 0.42.6). There are 4 mqtt.js clients of different sensors from three factories that send data every 5 minutes. Everything works correctly but after several days (15-16 days approx) the broker stops receiving and sending messages. The sending and receiving clients continue to function but the broker does nothing.
In the logs (of pm2) they always match something like this:
[3/19/2021, 7:00:05 AM] Client CENSYS just connected
{"level": 30, "time": 1616137205130, "msg": "subscribed", "pid": 3241, "hostname": "ip-172-31-26-205.eu-west-2.compute. internal "," client ": {" id ":" CENSYS "}," subscriptions ": [{" topic ":" # "," qos ": 0}]," v ": 1}
{"level": 40, "time": 1616137205152, "msg": "read ECONNRESET", "pid": 3241, "hostname": "ip-172-31-26-205.eu-west-2.compute .internal "," client ": {" id ":" CENSYS "}," type ":" Error "," stack ":" Error: read ECONNRESET \ n at TLSWrap.onStreamRead (internal / stream_base_commons.js: 200: 27) "," errno ":" ECONNRESET "," code ":" ECONNRESET "," syscall ":" read "," v ": 1}
Although this message happens more times but the broker continues to work correctly, I see that it is also when it stops working. (By the way, no idea what CENSYS is).
I can not find the problem and this is working in production in three factories. Any ideas?
Upvotes: 2
Views: 303