{"err":"Offline","message":"no connection to modbus server"}"

Hello I am using the package "node-red-contrib-modbustcp" . I create a modbus tcpip server and it worked fine until it appeared the following error: "{"err":"Offline","message":"no connection to modbus server"}" and also "socket error: Error: connect ECONNREFUSED" . The server was configure with 127.0.0.1 and port 502. The firewall of the computer is turned off.

I reboot my computer and It works again, but I would like to know what it's the reason to avoid it in the future !

Regards

if it works and then stops working it sounds as if the node isn’t handling deploys or errors in the connection properly. You should open an issue on the nodes github page to contact the author

Where do you see that message? It does not look like an error that would come from a modbus server, but from the modbus client.

It appears in node-red debugging section and also I can read it in the command prompt where is node-red running

regards

You should be able to identify which node it is coming from. The message should have the node-id I think, which you can search for.
Do you have a node-red modbus client as well as the server in node-red?
Or have I misunderstood the question, when you say you have created a modbus tcpip server do you mean you have created an actual modubus server inside node-red, or are you communicating with a server outside node-red?

Regrettably I can't identify the node because I did not check the identifier, but I know that came from the modbus server because It appeared in the debugging section like an error from de modbus server.

No, I haven't a modbus client running in node-red

I have a modbus tcp/ip server created in node-red and I was trying to communicate with a modbus tcp/ip client like "qmodbus master".

Can you show us the configuration of the modbus server node please?

I have just installed that node and it appears to be only a modbus client, containing modbus read and modbus write nodes. The server information you setup there does not create a modbus server, you use it for specifying how to talk to an existing modbus server. Since you have not got an actual modbus server this fails, hence the error you are seeing.