Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
We have a compulsory "max number of sessions" within OPC-UA in our company which is 10 and a timeout of 20 minutes by default.
Give this restriction, we get "BadTooManySessions" many like this
after investigating we noticed that OPC-UA ASYNCIO creates sessions but do not close them in the following reproducible scenarios:
Starting point:
2 connectors "disabled" from last session (where we couldn't work any more due to "BadTooManySessions")
Scenarios/ not expected behaviours:
1) Once gateway is started:
if TB edge PE is not available (down) ==> connections is not established which is OK.
if TB edge PE is available (up) ==> it creates a new session, the 4th, even when connector is disabled. We started UAexpert with 3. This is the output of logs. We guess its because there were some pending data to be sent but its shouldnt anyways because connector is disabled in this case
Expected: Do not connect if connector is disabled.
Describe the bug
We have a compulsory "max number of sessions" within OPC-UA in our company which is 10 and a timeout of 20 minutes by default. Give this restriction, we get "BadTooManySessions" many like this after investigating we noticed that OPC-UA ASYNCIO creates sessions but do not close them in the following reproducible scenarios:
Starting point:
2 connectors "disabled" from last session (where we couldn't work any more due to "BadTooManySessions")
Scenarios/ not expected behaviours:
1) Once gateway is started:
Expected: Do not connect if connector is disabled.
Note that the duplicate_detector error we don't know why its produced and it was the first time to be seen.
2) Another 2 sessions are created once a connector is started. Maybe one per timeseries? Check the configurator Expected: 1 session per connector.
3) Sessions are not released after disabling the connector
We also tested to disable->enable->disable and additional sessions are created without releasing the previous ones
Expected: Sessions are released after disabling the connector
4) Closing gateway do not release sessions.
Expected: Sessions are released after closing gateway
Connector name (If bug in the some connector): OPC-UA asyncio Connector
Error traceback (If available): Above
Versions (please complete the following information):