Python: Pyro: OpenOPC: connection failed

I am trying to set up OpenOPC for Python in conjunction with Pyro. Whenever I try to connect to the OPC server, I get this error:

Pyro.errors.ProtocolError: connection failed

I looked at this and it seems that Pyro binds the server to 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

      

It didn't work.

Modify configure.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',

      

It didn't work either. Also after reboot / restart the Pyro nameserver.

Does anyone know what else I could try to get it to work? I also ran the OpenOPC client on my windows machine (the same as the OPC server) and it worked. I am using the same version of Pyro on my Windows machine and Ubuntu machine.

Edit: I also changed OpenOPCService.py:

opc_gate_host = None 
into 
opc_gate_host = '192.168.4.93'

      

This doesn't work either ...

Can anyone please help? I have been working on this now throughout the day without any success so far ...

+3


source to share





All Articles