# Failed to connect to Ignition OPC UA Server by using node-opcua

**URL:** <https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349>\
**Category:** Ignition\
**Created:** [May 28, 2019, 10:04am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349 "2019-05-28T10:04:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rukechen](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rukechen](https://forum.inductiveautomation.com/u/rukechen)\
**Post date:** [May 28, 2019, 10:04am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/1 "2019-05-28T10:04:36Z")

</div>

Hi,  
I have tried three different version Ignition to be a OPC UA Server.(Windows x64 8.0.1 and 8.0.2-rc1, Ubuntu 8.0.1). If I use Prosys OPC UA Client to connect, I can connect successfully by trusting the certification. But I can’t connect by using node-opcua.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/99ccfe5978c34831c63643b758fb5110987a2b64.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4281930525012239a3a8a102cc8abfdc04f25f99.png)

```auto
UascServerAsymmetricHandler
28May2019 17:51:30
Error installing security token: StatusCode{name=Bad_SecurityChecksFailed, value=0x80130000, quality=bad}

org.eclipse.milo.opcua.stack.core.UaException: no matching endpoint found: transportProfile=TCP_UASC_UABINARY, endpointUrl=opc.tcp://172.17.30.162:62541/discovery, securityPolicy=Basic256, securityMode=SignAndEncrypt

at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerAsymmetricHandler.lambda$openSecureChannel$3(UascServerAsymmetricHandler.java:405)

at java.base/java.util.Optional.orElseThrow(Unknown Source)

at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerAsymmetricHandler.openSecureChannel(UascServerAsymmetricHandler.java:395)

at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerAsymmetricHandler.lambda$sendOpenSecureChannelResponse$1(UascServerAsymmetricHandler.java:299)

at org.eclipse.milo.opcua.stack.core.channel.SerializationQueue.lambda$encode$0(SerializationQueue.java:57)

at org.eclipse.milo.opcua.stack.core.util.ExecutionQueue$Task.run(ExecutionQueue.java:119)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

```

Does anyone have comment for this ?

Thanks

By the way, I also download the ignition\_logs.idb.

---

<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:** [May 28, 2019, 11:37am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/2 "2019-05-28T11:37:42Z")

</div>

Can you upload the logs somewhere so we can look at them?

edit: or provide the full text of the stack trace in your screenshot

---

<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:** [May 28, 2019, 3:16pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/3 "2019-05-28T15:16:42Z")

</div>

I was able to reproduce this using the node-opcua sample client. It seems to have an issue connecting to Ignition’s OPC UA server in its default configuration, where only secured connections are allowed to the main endpoint, and there’s a separate discovery-only endpoint that allows unsecured connections. This will have to be fixed in node-opcua.

As a workaround, you can enable connections without security in Ignition’s OPC UA server. Under `Config > OPC UA > Server Settings`, add “None” as a security policy:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/00ce5ae9b4c80ce8b870f37e8df44a53c799f559.png)

You’ll have to restart the gateway for this to take effect.

Due to some other bug unrelated to this, you’ll have to connect with a username and password instead of anonymously when using the node-opcua client.

---

<div class="post-metadata">

**Author:** ![rukechen](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rukechen](https://forum.inductiveautomation.com/u/rukechen)\
**Post date:** [May 29, 2019, 1:31am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/4 "2019-05-29T01:31:50Z")

</div>

Since I am not able to upload file, I edit my first post, and paste the related log.

For this case, I will try the workaround solution, and do you have further suggestions? I mean hot fix or ?

Thanks

Best regrards,

Ruke

---

<div class="post-metadata">

**Author:** ![rukechen](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rukechen](https://forum.inductiveautomation.com/u/rukechen)\
**Post date:** [May 29, 2019, 3:05am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/5 "2019-05-29T03:05:11Z")

</div>

Hi,

I set Security Policies to None, and use node-opcua to connect. I get another error.

```auto
UaStackServer
29May2019 11:01:39
Uncaught Throwable executing handler: org.eclipse.milo.opcua.stack.server.UaStackServer$$Lambda$2227/0x00000001014ea040@5fa7e9a

org.eclipse.milo.opcua.stack.core.UaSerializationException: no codec registered for encodingId=NodeId{ns=0, id=0}

at org.eclipse.milo.opcua.stack.core.types.OpcUaDefaultBinaryEncoding.decode(OpcUaDefaultBinaryEncoding.java:103)

at org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject.lambda$decode$0(ExtensionObject.java:126)

at org.eclipse.milo.opcua.stack.core.util.Lazy.maybeCompute(Lazy.java:45)

at org.eclipse.milo.opcua.stack.core.util.Lazy.getOrCompute(Lazy.java:35)

at org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject.decode(ExtensionObject.java:126)

at org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject.decode(ExtensionObject.java:117)

at org.eclipse.milo.opcua.sdk.server.SessionManager.onActivateSession(SessionManager.java:486)

at org.eclipse.milo.opcua.stack.server.UaStackServer.onServiceRequest(UaStackServer.java:243)

at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerSymmetricHandler$1.lambda$onMessageDecoded$1(UascServerSymmetricHandler.java:203)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

```

And the following is the node-opcua log

```auto
warning : ClientSessionKeepAliveManager#ping_server ServiceFault returned by server { /*ServiceFault*/
 responseHeader /* ResponseHeader */: {
   timeStamp /* UtcTime */: 2019-05-29T03:02:19.864Z
   requestHandle /* IntegerId */: 5 0x5
   serviceResult /* StatusCode */: BadSessionNotActivated (0x80270000)
   serviceDiagnostics /* DiagnosticInfo */: {
     namespaceUri /* Int32 */: -1
     symbolicId /* Int32 */: -1
     locale /* Int32 */: -1
     localizedText /* Int32 */: -1
     additionalInfo /* String */: null
     innerStatusCode /* StatusCode */: Good (0x00000)
     innerDiagnosticInfo /* DiagnosticInfo */: {
     }
   }
   stringTable /* String [] */: [] (l=1)
   additionalHeader /* ExtensionObject */: null
 }
};

```

Do you have any comment for this?

---

<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:** [May 29, 2019, 9:25am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/6 "2019-05-29T09:25:43Z")

</div>

> [@rukechen](#):
>
> Do you have any comment for this?

This is the "other bug unrelated to this" I mentioned. Try connecting with a username and password instead of anonymously.

---

<div class="post-metadata">

**Author:** ![rukechen](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rukechen](https://forum.inductiveautomation.com/u/rukechen)\
**Post date:** [May 29, 2019, 9:57am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/7 "2019-05-29T09:57:07Z")

</div>

Got it. I shall try it.

Thanks

---

<div class="post-metadata">

**Author:** ![rukechen](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rukechen](https://forum.inductiveautomation.com/u/rukechen)\
**Post date:** [May 30, 2019, 1:43am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/8 "2019-05-30T01:43:23Z")

</div>

Hi Kevin,

I have updated my post. Please check out the related logs.  
If you need more information, please let me know.

Thanks.

---

<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:** [May 30, 2019, 1:53am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/9 "2019-05-30T01:53:07Z")

</div>

If you connect with a username and password it should work. Connecting anonymously will be fixed in an 8.0.3 nightly release soon.

That it doesn’t work with security enabled is a bug in the node-opcua stack and they will have to fix it.

---

<div class="post-metadata">

**Author:** ![Koen](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@Koen](https://forum.inductiveautomation.com/u/Koen)\
**Post date:** [September 16, 2019, 2:33pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/10 "2019-09-16T14:33:19Z")

</div>

Hi guys,

I’ve been having similar issues. I have Edge 8.0.3 installed on a RevolutionPi (ARM processor). I am trying to connect with a NodeRed node - which I’m sure runs on node-opcua.

I followed what Kevin said: no anonymous login, and I set the Security Policies on Edge to None.

That got me as far as connecting with Nodered, as long as I use ‘localhost’ as ip address. When i use the actual IP address either on the same host, or another machine on the network - I get no connection.

I’m not sure where to look in the logs. Is it possible that this is a Raspbian issue and not Ignition?

Thanks  
Koen

---

<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:** [September 16, 2019, 2:46pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/11 "2019-09-16T14:46:50Z")

</div>

The OPC UA server in Ignition Edge only binds to localhost and only allows local connections to it. This is one of the Edge limitations.

---

<div class="post-metadata">

**Author:** ![Koen](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@Koen](https://forum.inductiveautomation.com/u/Koen)\
**Post date:** [September 16, 2019, 3:10pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/12 "2019-09-16T15:10:26Z")

</div>

Ah - 😥

I will have to try with Vanilla Ignition then…

Thanks for the rapid feedback. 🚀

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [August 15, 2023, 1:31pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/13 "2023-08-15T13:31:06Z")

</div>

I read from the edge compute module brochure. the external OPCUA client can access the edge OPCUA server as long the iiot module is installed.

can you advise whether it's feasible?  
I cannot use third party OPC client to access the edge OPCUA Server, even after the iiot mdoule is installed, see the license detail below.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/6/96aeb0e639b54d4919ed7931c1b69fed42549c24.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/c/ec8fed5e4c93ada7dbc77c518d6310f69e4da611.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 15, 2023, 2:43pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/14 "2023-08-15T14:43:51Z")

</div>

Have you reconfigured your Edge OPC server to listen to the wildcard address (0.0.0.0) instead of localhost? And configured appropriate security?

By default, it only listens to localhost (not just Edge).

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [August 15, 2023, 3:01pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/15 "2023-08-15T15:01:00Z")

</div>

I tried to check the Edge OPC UA settings/Bind Addresses to: 0.0.0.0.

It is not working.

Then I tried to run the Openua OPC client from the same machine, still not good.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/f/9fc698f23bd81458d09ae23d48ef9ba9f56b8fb2.png)

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [August 15, 2023, 3:24pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/16 "2023-08-15T15:24:48Z")

</div>

> [@chaoliang](#):
>
> I tried to check the Edge OPC UA settings/Bind Addresses to: 0.0.0.0.

Did you restart the gateway after making this change?

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [August 15, 2023, 11:40pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/17 "2023-08-15T23:40:25Z")

</div>

I restarted the edge station, still not working.

Do I need to add the edge compute module to get it working?

Currently I already have the iiot module.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 15, 2023, 11:41pm UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/18 "2023-08-15T23:41:38Z")

</div>

Compute shouldn't be required, IIRC. Sounds like you need support looking over your shoulder.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [August 16, 2023, 1:34am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/19 "2023-08-16T01:34:11Z")

</div>

I checked the opcua client to Matrikon OPC UA Explorer.

Now I can connect to the edge opc ua server.

Here's another issue:  
For Programmable Device Simulator values, I can see the live value from the OPC client.  
But for PLC connected value, I am not able to see the value.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/8/f81c9280ca7f1c94b7a3ec4a56dbd19162440b0a.png)  
both values are configured under tag providers and taken from there for data view.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/2/4204604bd704037a566dcffc91245566905eb669.png)  
not sure whether it's still related to ignition opc server, or related to ignition device configuration or related to Matrikon OPC client.

Kind of confused.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [August 16, 2023, 2:35am UTC](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349/20 "2023-08-16T02:35:35Z")

</div>

I didn't want to give up. So now I changed to Nodered OPC Client.  
Sadly, I cannot get it working either.  
then I googled a bit, and found this post, then I realized that the original question of this post is about Node Red OPC client connecting to ignition edge.

haha. Back to where it all starts.

[Next page](https://forum.inductiveautomation.com/t/failed-to-connect-to-ignition-opc-ua-server-by-using-node-opcua/25349.md?page=2)
