Troubleshooting OPC-UA connections
Common connection issues
Error | What it Means | How to Fix |
|---|---|---|
TCP connection timeout or TCP connection refused | Network/firewall issue | Check network path and firewall. Windows: test-netconnection <ip> -port <port> Linux: telnet <ip> <port> |
TCP connection refused | OPC-UA server not listening on this address/port | Verify the address and port in the OPC-UA server settings and/or check the logs of the OPC-UA server |
StatusBadTCPEndpointURLInvalid (0x80830000) | Wrong endpoint address | Check and correct the endpoint in server vs. client |
Failed to find suitable endpoint | Security settings mismatch | Adjust SecurityMode/Policy in client or server |
StatusBadIdentityTokenInvalid (0x80200000) | Wrong username/password or credentials not needed | Enter correct credentials, or remove them if not needed |
EOF / BadSecurityChecksFailed (0x80130000) | Certificate not accepted yet | Accept the client certificate on the server |
Unstable (collector health) | Multiple consecutive read requests failed | Check the specific issue in the collector logs |
Other connection issues
- Time difference: If clocks are too much out of sync (hours, not seconds), security tokens may expire too soon. Sync all clocks with NTP.
Common OPC-UA status codes
When collecting data from an OPC-UA server, each value comes with a status code that tells you if the data is reliable (Good) or if there is a problem with it. Here are some common status codes and what they mean.
Status Code | Meaning | What to Do |
|---|---|---|
Bad (0x80000000) | Unspecified issue with the data | Check the data at the source |
BadNodeIDUnknown (0x80340000) | The NodeID is unknown to the server | Browse the server to find the correct NodeID |
BadNodeIDUnknown (0x80340000), but only for monitored data | The namespace is incorrect | Try another namespace, e.g. ns=2 instead of ns=3 or vice versa |
BadTooManyOperations (0x80100000) | Too many operations in one request | Lower the MaxNodesPerRegister and/or MaxNodesPerRead setting |
BadTooManyMonitoredItems (0x80DB0000) | Too many monitored items for the server | Adjust server limits or split over multiple collectors Sometimes: clean up old sessions |
GoodOverload (0x002F0000) | Server can't keep up with requested rate | Lower the update rate or increase server resources |
BadTimeout (0x800A0000) | Server couldn't provide a value in time | Check network, device status and server resources |
BadNothingToDo (0x800F0000) | Client requested an action that does not change anything (no-op) | Nothing |
BadOutOfMemory (0x80030000) | Server cannot complete the request due to RAM limitations | Lower the update rate or increase server resources |
For a full list of OPC-UA status codes, see the official list.
Factry status codes
Factry has added a few of our own status codes to highlight specific issues.
Status Code | Meaning | What to Do |
|---|---|---|
BadInvalidNodeID | The NodeID in your settings contains syntax errors | Enter a valid NodeID |
BadFactryOPCUARegisterNodesFailed | Collector failed to register nodes (often too many at once) | Lower the MaxNodesPerRegister and/or MaxNodesPerRead setting |
BadFactryMonitorError / Error from subscription notification channel | Collector failed to monitor nodes (often too many at once) | Lower the MaxNodesPerMonitor setting |
BadNoValueAtArrayIndex | Array index out of bounds or missing value | Check the ArrayIndex setting |
BadFactryOPCUATooManyOpenReadRequests | New read requests open faster than they are processed | Check network, device status and server resources |
UnknownStatusCode_0xXXX | Status code outside OPC-UA spec | Check server docs |
BadFactryInvalidDataForDatatype | Data can't be parsed to the requested type | Check the Datatype setting |
Other data collection issues
Value for monitored measurement after reconnect
Whether monitored measurements receive a value after a reconnect depends on the implementation of the OPC-UA server. There are 3 options:
- The server does not send a value
- The server sends the latest value with its original timestamp
- The server sends the latest value with the current timestamp
Depending on the behavior, a monitored measurement can keep a bad quality for a while after reconnect. Since the quality is only updated when points come in, the bad quality will remain until new Good data arrives.
x509: invalid basic constraints
The log Error attempting to reconnect to OPC-UA server: x509: invalid basic constraintsindicates that the OPC-UA server certificate is not valid. Update the collector to v2.0.3 or higher or contact your OPC-UA server vendor to update the server certificate to a valid one if the issue persists.
Kepware
For issues specific to Kepware, have a look at Kepware troubleshooting.
Low-level debugging
If necessary, low-level OPC-UA logging can be enabled to debug connection issues. To do so, set the LogLevelLogLevel to 'trace'. If that option is not available, update the collector to v2.1.0 or higher or follow the steps described here.