OPC-UA / DA Connection

Hello

I’m trying to connect the Ignition to an OPC server (Caen HV).

If I use the Ignition in Windows, I can connect by OPC-DA and I can read some tags.
But I need to use Ignition in Linux. In Linux I only can connect by OPC-UA.

I tried to connect by OPC-UA but I had some errors…

The Caen OPC Server:
I found the OPC port 4840 for Caen Server:

I chosed each connection but without success. It’s possible to connect Ignition by OPC-UA to a OPC-DA Server?

Thank you
Greetings,

Cédric Pereira

OPC-DA depends on DCOM, which is a windows security feature. So no, you can’t connect to OPC-DA on Linux. OPC-DA and OPC-UA are also completely different technologies and aren’t compatible with each other.

You didn’t say what errors you had, but my first guess would be that you didn’t import the certificates. You should probably be able to import the OPC-UA certificate in your OPC-UA server, or either configure that server to use no security policy (which is good enough if you work in a controlled environment).

Sorry i forgot the error mensages:

java.net.ConnectException: Connection refused: localhost/127.0.0.1:4840
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:545)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745)

I think the problem is my OPC Server works only with OPC-DA and Ignition Linux only with OPC-UA. :pensive:

If you’re getting a discovery server when you try to find a UA connection then it’s likely that the Caen server supports both the UA and DA protocols.

The connection refused error is most likely just a firewall. Try disabling Windows firewall temporarily, or just adding an exception for port 4840.

EDIT: Whoops, Kevin’s totally correct. Missed the forest for the trees.

The server you’re connecting to is returning “localhost” in its endpoint URLs. This is a configuration error on the server’s part.

You can workaround this, however, by setting the “Host Override” setting on your OPC UA connection to contain the original hostname you used for discovery (192.168.3.156).

You may later run into the issues described by @PGriffith and @Sanderd17, but that’s not your problem right now.

1 Like

Thank you for your help.

I turned off the firewall and added the IP to the Host Override, but I didn't work... I had other error:

UaException: status=Bad_ConnectionClosed, message=connection closed
at org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler.channelInactive(UaTcpClientMessageHandler.java:164)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:193)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:179)
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:349)
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:309)
at io.netty.handler.codec.ByteToMessageCodec.channelInactive(ByteToMessageCodec.java:118)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:193)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:179)
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:944)
at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:687)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:374)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745)

There’s not enough information in that error alone to figure out what’s happening. All it says is the server closed the connection for some reason.

This might be because of a certificate issue or it might be something else. If you can get the logs and preferably a Wireshark capture it would be easier to troubleshoot.