-
Notifications
You must be signed in to change notification settings - Fork 968
Description
Connector name (If bug in a connector):
OPC-UA Connector
Describe the bug
Starting from ThingsBoard IoT Gateway version 3.8.2, if an OPC-UA data mapping points to an unreachable variable and connector read returns
Bad status code: Bad for node: NodeId(Identifier=25, NamespaceIndex=0, NodeIdType=TwoByte) with description The operation failed.
the gateway stops sending updates to the server even if the scan mode is set to ON_REPORT_PERIOD or ON_CHANGE_OR_REPORT_PERIOD.
Conditions observed:
- This issue occurs only when
"enableSubscriptions": true. - Using polling (
enableSubscriptions: false) works as expected. - Configuring
server.subKeepAlivePeriodInSecondsdoes not resolve the issue. The connector logs show:
[device.py] - device subscription_watchlog - 149 - Subscription for device DEMO_BAD has not received any data change notifications for 114.96 seconds. Marking subscription as expired.
The gateway does not attempt to re-subscribe, so updates are not retried, and no new signals are sent to the server.
Steps to Reproduce
- Create a Gateway and a Device to read from an OPC-UA Server using
ON_REPORT_PERIODorON_CHANGE_OR_REPORT_PERIOD. - Simulate a variable with a bad/unreachable status on the OPC-UA Server (e.g.,
Bad/Unknown). - Observe the Device in ThingsBoard: the last update contains the error message but no further updates are sent.
Expected behavior:
The gateway should continue attempting to push updates at the configured period, even if a variable temporarily returns a bad status. Previously, error messages were sent periodically as configured.
Error traceback (if available):
[device.py] - device subscription_watchlog - 149 - Subscription for device DEMO_BAD has not received any data change notifications for 114.96 seconds. Marking subscription as expired.
Bad status code: Bad for node: NodeId(Identifier=25, NamespaceIndex=0, NodeIdType=TwoByte) with description The operation failed.
Versions (please complete the following information):
- ThingsBoard IoT Gateway version: 3.8.2 (Docker)