Context:
- Ignition is the Client
- Supplier OPC-UA Server (SDK unknown)
What happend:
After some conditions (which are still investigated), the server keeps the existing secure channel open but answers with Bad_ServerHalted to Ignition. A new TCP connection to the same endpoint is accepted and we can also connect with a new session immediately.
The OPC-UA client in Ignition trys to reause the old channel during its reconnect loop (~every 16s?!) until we disable and re-enable the connection manually. The Disable/Enable directly restores the connection.
DEBUG logs from SessionFsm:
S(Active) x E(ServiceFault) = S'(ReactivatingWait)
Reactivation failed: UaServiceFaultException: status=Bad_ServerHalted, message=The server has stopped and cannot process any requests.
S(Reactivating) x E(ReactivateSessionFailure) = S'(CreatingWait)
Sending CreateSessionRequest...
CreateSession failed: UaServiceFaultException: status=Bad_ServerHalted, ...
S(Creating) x E(CreateSessionFailure) = S'(CreatingWait
Request:
We know that the root cause is on the server side, but we also saw that other clients can recover by itself, therefore it would be create to enhance/harden the reconnect in Ignition like so:
- After repeated Bad_ServerHalted on CreateSession, close the secure channel and reconnect with a new one, maybe the attempts can be configurable. Bad_ServerHalted anyway means the server instace is stopped based on the OPC-UA specs, so keeping the channel open will never succeed by definition. A WARN log would also be helpful to make it more visible.
For now, we are testing, if we can use a gateway timer script to toggle the connection when it is faulted and the endpoint is reachable.