Closed slokhorst closed 1 year ago
@Randelung there is also a pr called " fix race condition or similar" Which of these or fix your issue?
As far as I can tell both #321 and #324 fix the issue. So far #317 also appears so, too.
I too have not seen the issue with recent versions of this lib (after #324?), so it seems to be fixed. (sorry for my long unresponsiveness but I did not have access to the device for a while)
Is my error I get periodically connected to the issue or needs to open new one?
ERROR:asyncua.client.client:Error while renewing session Traceback (most recent call last): File "C:\Users\Labuser\AppData\Local\Programs\Python\Python39\lib\site-packages\asyncua\client\client.py", line 399, in _renew_channel_loop await self.open_secure_channel(renew=True) File "C:\Users\Labuser\AppData\Local\Programs\Python\Python39\lib\site-packages\asyncua\client\client.py", line 292, in open_secure_channel result = await self.uaclient.open_secure_channel(params) File "C:\Users\Labuser\AppData\Local\Programs\Python\Python39\lib\site-packages\asyncua\client\ua_client.py", line 278, in open_secure_channel return await self.protocol.open_secure_channel(params) File "C:\Users\Labuser\AppData\Local\Programs\Python\Python39\lib\site-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 "C:\Users\Labuser\AppData\Local\Programs\Python\Python39\lib\site-packages\asyncua\client\ua_client.py", line 134, in _send_request self.transport.write(msg) AttributeError: 'NoneType' object has no attribute 'write'
I don't think that it's immediately connected. The original issue was a race condition for token renewal and packet reception already with a new, at that point unrecognized token. I'd say your issue is sufficiently different to warrant a new ticket in any case (especially since the original issue has technically been resolved for six months). I'd recommend giving more info, though, just the error won't help much. What is your setup, what are you doing, can you reproduce the issue, and so on.
I have a running client with subscription that does just fine. After a while, I get the following error and the client disconnects:
I'm connecting to a Siemens S7-1200 PLC's built-in OPC-UA server.