OpenOPC icon indicating copy to clipboard operation
OpenOPC copied to clipboard

error on listing servers

Open Miky94 opened this issue 6 years ago • 6 comments

I followed OpenOPC Library Tutorial:

import OpenOPC
opc = OpenOPC.open_client('<server-ip>')
opc.servers()

but when I try listing servers I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\Pyro\core.py", line 381, in __call__
    return self.__send(self.__name, args, kwargs)
  File "C:\Python27\lib\site-packages\Pyro\core.py", line 455, in _invokePYRO
    self.adapter.bindToURI(self.URI)
  File "C:\Python27\lib\site-packages\Pyro\protocol.py", line 330, in bindToURI
    raise ProtocolError('connection failed')
Pyro.errors.ProtocolError: connection failed

suggestions?

Miky94 avatar Oct 02 '18 14:10 Miky94

Did you replace the argument '' with your OPC IP address or hostname?

xandrade avatar Oct 02 '18 18:10 xandrade

yes of course

Miky94 avatar Oct 02 '18 18:10 Miky94

Fine, did you try connecting first with an OPC client? May I ask for the OPC server you are trying to connect to? OPC DA? What about the brand? MatrikonOPC?

xandrade avatar Oct 02 '18 18:10 xandrade

I tried connecting first from the server itself (using localhost) and it worked , but not from another pc. the OPC server is the Matrikon.OPC.Simulation.1 integrated in MatrikonOPC Explorer. I also tried using instead the OpenOPC Command-line Client with opc -h <server-ip> -q and I get: Error getting server list from <server-ip>' - servers: Unspecified error. even this worked from the server itself. I'm working in a LAN with windows firewall turned off on both client and server machines

Miky94 avatar Oct 04 '18 11:10 Miky94

@Miky94 I faced the same issue but when i turned off the firewall on windows ,I am able to connect to OPC server.

shrutifiske avatar Dec 04 '18 13:12 shrutifiske

I hope it will help: https://github.com/papercodeIN/OpenOPC-PyModbus-Snap7-MQTT/tree/main/OPC/OPC-DA

papercodeIN avatar Apr 09 '21 08:04 papercodeIN