Random ECONNRESET & ETIMEDOUT http request errors

Got some node red instances running on different locations, most are 'edge' instances running on physical pi5. One is 'cloud' instance running on azure. All of them send data, mostly http post / rest request API to Thingsboard. But the node red cloud instance logs fails several times per day, always with error ETIMEDOUT or ECONNRESET. Upon further inspection I can't find these errors on node red 'edge' instances running on pi5.

Initial suspicion was the Thingsboard pro cloud server / backend, but now I think it may be caused somewhere in the azure cloud network? Unfortunately any insight into Thingsboard cloud is severely limited, so don't get much detailed logs there.

How to investigate it further? Tempted to move node red from azure docker container to a docker container running on local pi5, run for some days and see if the errors disappear. My guess is that the problems disappear.

Any thoughts or info on the topic would be greatly appreciated.

Can the Thingsboard server be pinged? If so you could watch to see if the server becomes unavailable at any point.

Yeah could make a ping bot.

A fix I already applied was to try a 2nd time if first time failed. That solved many of the failed requests, but even then a few times it fails on 2nd attempt also. I only try twice at the moment to prevent potential infinite loops, but will think about increasing to more attempts.

I meant just a Ping node and a Switch, logging whenever the ping failed, in order to get more information about the problem.

1 Like