Reputation: 757
I'm trying to set up OpenOPC for Python in combination with Pyro. Whenever I try to connect to the OPC server I get this error:
Pyro.errors.ProtocolError: connection failed
I looked this up and it seems that Pyro is binding the server on the loopback adapter (making it invisible from the outside).
What I have tried so far:
Edit the etc/hosts file:
Changed:
127.0.0.1 localhost
into
192.168.4.93 localhost
This didn't work.
Edit configuration.py from Pyro:
Changed:
'PYRO_HOST': '',
'PYRO_PUBLISHHOST': None,
'PYRO_NS_HOSTNAME': None,
into
'PYRO_HOST': '192.168.4.93',
'PYRO_PUBLISHHOST': '192.168.4.93',
'PYRO_NS_HOSTNAME': '192.168.4.93',
This didn't work either. Also after rebooting/restarting the Pyro nameserver.
Does anyone have any idea what else I could try to get it working? I also ran the OpenOPC client on my windows computer (same one as the OPC server) and this worked. I use the same version of Pyro on my Windows computer and Ubuntu computer.
Edit: I have also changed OpenOPCService.py:
opc_gate_host = None
into
opc_gate_host = '192.168.4.93'
This doesn't work either...
Could anyone please help? I'm working on this now for over a day without any succes so far...
Upvotes: 3
Views: 2177