opcua
opcua copied to clipboard
Auto-reconnect breaks registered reads in some cases
After an auto-reconnect all registered node ids are (might be) invalid.
We have recently stumbled over this rather obvious issue and disabled registered reads on our clients in turn.
The gopcua client handles subscriptions gracefully on reconnects since it recreates the monitored items but it does not do the same with registered node ids.
So what you might observe is that you register a node id, perform reads with it and all of a sudden you get a StatusBadNodeIDInvalid
error because the client has reconnected, the session got recreated and the registered node id is no longer valid.
I think this is only the case when the session had to be re-created so this might not be an issue for all servers
The current workaround is to disable (not perform) registered reads.