OPC UA Modbus TCP stuck on Connecting

I have a Modbus TCP connection to a device. This connection gets stuck on ‘Connecting’ when ever there is a power failure and power is restored.

I suspect it might be because the device that I am connecting to from Ignition, takes a little longer to start up, and by then the MBTCP connection goes into this stuck state.

What do I need to do to effectively troubleshoot this (logs?) or is there a setting to delay the connection to this device?

Currently, when the Modbus TCP connection is stuck in Connecting, I can edit and immediately resave this connection, and thereafter the status changes to connected.

I hope these power failures dont happen to often…

anyways you could try disabling and the re-enabling a connection with system.opc.setServerEnabled - Ignition User Manual 8.1 - Ignition Documentation
maybe that fixes the problem

Restarting the device would be more appropriate, using system.device.restart() or a pair of system.device.setDeviceEnabled(). (False, then True, for older versions that don’t have the .restart() function.)

1 Like

We had an identical bug a few days ago. For us the issue was that we had a redundant gateway in warm mode that was racing the primary gateway to establish a connection first. When one connected, the socket would be blocked and the other would be unable to connect. Changing it to cold standby fixed the problem.

My main concern is why it’s getting stuck in this Connecting state and how do I stop it from doing this.

Power loss is not often, but if it does occur, I would hope my devices would automatically connect to my Ignition Gateway without having to manually restart or reconnect any connections.

@BenKearney Noted. Interesting problem. My setup is simple - this is a single Edge Gateway connecting to one device.