You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this OPC UA python Client to connect with my ignition scada opc ua server with SecurityPolicyBasic256Sha256 enclosing my code and detailed error message.
WARNING:asyncio:Executing <Task pending name='Task-1' coro=<task() running at /root/py_factory/opcua_asyncio.py:19> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.9/asyncio/futures.py:384, <TaskWakeupMethWrapper object at 0x7fa9bfaf3910>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> cb=[_run_until_complete_cb() at /usr/lib/python3.9/asyncio/base_events.py:184] created at /usr/lib/python3.9/asyncio/base_events.py:621> took 0.185 seconds
INFO:asyncua.client.client:connect
INFO:asyncua.client.ua_client.UaClient:opening connection
INFO:asyncua.client.ua_client.UASocketProtocol:open_secure_channel
WARNING:asyncua.uaprotocol:Received an error: ErrorMessage(Error=StatusCode(value=2148728832), Reason='status=Bad_SecurityChecksFailed, description=An error occurred verifying security.')
CRITICAL:asyncua.client.ua_client.UASocketProtocol:Received an error: ErrorMessage(Error=StatusCode(value=2148728832), Reason='status=Bad_SecurityChecksFailed, description=An error occurred verifying security.')
ERROR:asyncua.client.ua_client.UASocketProtocol:Exception raised while parsing message from server
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/ua_client.py", line 167, in _call_callback
self._callbackmap[request_id].set_result(body)
KeyError: 0
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/ua_client.py", line 79, in _process_received_data
self._process_received_message(msg)
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/ua_client.py", line 103, in _process_received_message
self._call_callback(0, ua.UaStatusCodeError(msg.Error.value))
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/ua_client.py", line 169, in _call_callback
raise ua.UaError(f"No request found for request id: {request_id}, pending are {self._callbackmap.keys()}, body was {body}") from ex
asyncua.ua.uaerrors._base.UaError: No request found for request id: 0, pending are dict_keys([1]), body was "An error occurred verifying security."(BadSecurityChecksFailed)
INFO:asyncua.client.ua_client.UASocketProtocol:Request to close socket received
INFO:asyncua.client.ua_client.UASocketProtocol:Socket has closed connection
WARNING:asyncua.client.ua_client.UaClient:disconnect_socket was called but connection is closed
Traceback (most recent call last):
File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/py_factory/opcua_asyncio.py", line 41, in <module>
main()
File "/root/py_factory/opcua_asyncio.py", line 36, in main
loop.run_until_complete(task(loop))
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/root/py_factory/opcua_asyncio.py", line 25, in task
async with client:
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/client.py", line 69, in __aenter__
await self.connect()
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/client.py", line 255, in connect
await self.open_secure_channel()
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/client.py", line 306, in open_secure_channel
result = await self.uaclient.open_secure_channel(params)
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/ua_client.py", line 280, in open_secure_channel
return await self.protocol.open_secure_channel(params)
File "/usr/local/lib/python3.9/dist-packages/asyncua/client/ua_client.py", line 213, in open_secure_channel
await asyncio.wait_for(self._send_request(request, message_type=ua.MessageType.SecureOpen), self.timeout)
File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
Any insight on this error would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am using this OPC UA python Client to connect with my ignition scada opc ua server with SecurityPolicyBasic256Sha256 enclosing my code and detailed error message.
Code
Error Block
Any insight on this error would be greatly appreciated!
Thanks,
Hari GB.
Beta Was this translation helpful? Give feedback.
All reactions