Skip to content

[BUG] OPC-UA Connector Subscription Stops Sending Updates on Bad Node Status (Working in 3.8.1 no longer in 3.8.2) #2093

@gaborando

Description

@gaborando

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.subKeepAlivePeriodInSeconds does 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

  1. Create a Gateway and a Device to read from an OPC-UA Server using ON_REPORT_PERIOD or ON_CHANGE_OR_REPORT_PERIOD.
  2. Simulate a variable with a bad/unreachable status on the OPC-UA Server (e.g., Bad/Unknown).
  3. 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)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions