# OPC-UA / DA Connection

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663>\
**Category:** Ignition\
**Created:** [June 30, 2017, 1:14pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663 "2017-06-30T13:14:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cedric](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@cedric](https://forum.inductiveautomation.com/u/cedric)\
**Post date:** [June 30, 2017, 1:14pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663/1 "2017-06-30T13:14:18Z")

</div>

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:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/2706b45d6e3d553d1691b0625664cec5e23da74c.jpg)

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

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [June 30, 2017, 1:29pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663/2 "2017-06-30T13:29:49Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![cedric](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@cedric](https://forum.inductiveautomation.com/u/cedric)\
**Post date:** [June 30, 2017, 2:01pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663/3 "2017-06-30T14:01:57Z")

</div>

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. 😔

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 30, 2017, 3:39pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663/4 "2017-06-30T15:39:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 30, 2017, 3:43pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663/5 "2017-06-30T15:43:50Z")

</div>

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 @paul-griffith and @Sanderd17, but that’s not your problem right now.

---

<div class="post-metadata">

**Author:** ![cedric](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@cedric](https://forum.inductiveautomation.com/u/cedric)\
**Post date:** [June 30, 2017, 4:48pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663/6 "2017-06-30T16:48:27Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 30, 2017, 4:54pm UTC](https://forum.inductiveautomation.com/t/opc-ua-da-connection/14663/7 "2017-06-30T16:54:26Z")

</div>

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.
