Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]the above error message appeared after the gateway ran for a while; the connector used opcua. #1505

Closed
ultimate-smile opened this issue Aug 16, 2024 · 2 comments · Fixed by #1501
Assignees
Labels

Comments

@ultimate-smile
Copy link

Describe the bug
image
The above error message appeared after the gateway ran for a while; the connector used opcua.
Connector name (If bug in the some connector):
opcua connector

Error traceback (If available):

'deviceName'
2024-08-14 08:47:38 - |INFO| - [tb_updater.py] - tb_updater - check_for_new_version - 85 - 3.5.1
2024-08-14 08:47:38 - |INFO| - [tb_updater.py] - tb_updater - check_for_new_version - 87 -

[===UPDATE===]

 New version 3.5.1 is available!

[===UPDATE===]

2024-08-14 09:17:02 - |ERROR| - [client.py] - client - _monitor_server_loop - 559 - Error in watchdog loop
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 500, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/asyncua/client/client.py", line 552, in _monitor_server_loop
    _ = await self.nodes.server_state.read_value()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/asyncua/common/node.py", line 207, in read_value
    result = await self.read_data_value()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/asyncua/common/node.py", line 220, in read_data_value
    return await self.read_attribute(ua.AttributeIds.Value, None, raise_on_bad_status)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/asyncua/common/node.py", line 342, in read_attribute
    result = await self.session.read(params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/asyncua/client/ua_client.py", line 404, in read
    data = await self.protocol.send_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/asyncua/client/ua_client.py", line 167, in send_request
    data = await asyncio.wait_for(self._send_request(request, timeout, message_type), timeout if timeout else None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 502, in wait_for
    raise exceptions.TimeoutError() from exc
TimeoutError
2024-08-14 09:17:04 - |WARNING| - [opcua_connector.py] - opcua_connector - start_client - 189 - Failed to connect opcua
2024-08-14 09:17:06 - |WARNING| - [opcua_connector.py] - opcua_connector - start_client - 189 - Failed to connect opcua
2024-08-14 09:17:08 - |WARNING| - [opcua_connector.py] - opcua_connector - start_client - 189 - Failed to connect opcua
2024-08-14 09:17:10 - |WARNING| - [opcua_connector.py] - opcua_connector - start_client - 189 - Failed to connect opcua
2024-08-14 09:17:12 - |WARNING| - [opcua_connector.py] - opcua_connector - start_client - 189 - Failed to connect opcua
2024-08-14 09:47:39 - |INFO| - [tb_updater.py] - tb_updater - check_for_new_version - 85 - 3.5.1
2024-08-14 09:47:39 - |INFO| - [tb_updater.py] - tb_updater - check_for_new_version - 87 -

[===UPDATE===]

 New version 3.5.1 is available!

[===UPDATE===]

2024-08-14 10:47:41 - |INFO| - [tb_updater.py] - tb_updater - check_for_new_version - 85 - 3.5.1
2024-08-14 10:47:41 - |INFO| - [tb_updater.py] - tb_updater - check_for_new_version - 87 -
KeyError: 'deviceName'

Versions (please complete the following information):

  • OS: [e.g. Ubuntu 18.04]
  • Thingsboard IoT Gateway version [e.g. 2.0]
  • Python version[e.g. 3.7]
@ultimate-smile ultimate-smile changed the title [BUG] [BUG]the above error message appeared after the gateway ran for a while; the connector used opcua. Aug 16, 2024
@samson0v
Copy link
Contributor

Hi @ultimate-smile, thanks for your interest in ThingsBoard IoT Gateway!
We have a big performance and general update for the OPC-UA connector, so this PR can resolve your problem.

@ashdam
Copy link
Contributor

ashdam commented Aug 17, 2024

The error seems to be just a timeout on the main loop reading from OPCUA server. Networking issue ?

@samson0v samson0v linked a pull request Aug 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants