FreeOpcUa / python-opcua

LGPL Pure Python OPC-UA Client and Server
http://freeopcua.github.io/
GNU Lesser General Public License v3.0
1.36k stars 658 forks source link

Cannot Continuously fetch data from opc ua server #1054

Open maintainenceskaps opened 4 years ago

maintainenceskaps commented 4 years ago

@oroulet when we run the script to fetch data continuously we get the following error as well and we cannot connect to the opc ua server

from opcua import * clientc = Client("opc.tcp://xxxxx") clientc.connect()

Traceback (most recent call last): File "", line 1, in File "C:\ProgramData\Anaconda3\lib\site-packages\opcua\client\client.py", line 274, in connect self.send_hello() File "C:\ProgramData\Anaconda3\lib\site-packages\opcua\client\client.py", line 306, in send_hello ack = self.uaclient.send_hello(self.server_url.geturl(), self.max_messagesize, self.max_chunkcount) File "C:\ProgramData\Anaconda3\lib\site-packages\opcua\client\ua_client.py", line 262, in send_hello return self._uasocket.send_hello(url, max_messagesize, max_chunkcount) File "C:\ProgramData\Anaconda3\lib\site-packages\opcua\client\ua_client.py", line 190, in send_hello ack = future.result(self.timeout) File "C:\ProgramData\Anaconda3\lib\concurrent\futures_base.py", line 430, in result raise CancelledError() concurrent.futures._base.CancelledError

Interesting thing is the dashboard is built in node red and node red has no issues at all in maintaining a continuous connection with the opc ua server so this should not be a server issue is there any solution to continuously fetch data from the opc ua server without timeout errors

AndreasHeine commented 4 years ago

could you provide the client configuration code? what server is it? which stack is used or which vendor?