# Problem: Connection between Node-Red and opcua

**URL:** <https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061>\
**Category:** General\
**Created:** [22 January 2023 18:32 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061 "2023-01-22T18:32:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CESLBM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CESLBM](https://discourse.nodered.org/u/CESLBM)\
**Post date:** [22 January 2023 18:32 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061/1 "2023-01-22T18:32:55Z")

</div>

Hello,  
I met the Problem when I tried to use opcua. And I have upload my program.  
[flows.json](https://discourse.nodered.org/uploads/short-url/vBsvGGIZJnzGKwYDfxKNZg5DJSN.json) (148.2 KB)

\<"OpcUaClientNode: Case B: UserName & password does not match to server (needed by Sign): undefined undefined"\>  
\<"OpcUaClientNode: Case A: Endpoint does not contain, 1==None 2==Sign 3==Sign&Encrypt securityMode:[1] securityPolicy:["[Profile Reporting Links](http://opcfoundation.org/UA/SecurityPolicy#None%22%5D%22)\>  
\<"OpcUaClientNode: can't work without OPC UA Session"\>

I saw the similar problem in the forum but I am not quite understand how it is solved. Here is the Link:  
[https://discourse.nodered.org/t/issues-reading-data-from-opc-ua-server/53449](https://discourse.nodered.org/t/issues-reading-data-from-opc-ua-server/53449)

It would be nice if someone can give me some help  
Thanks a lot

---

<div class="post-metadata">

**Author:** ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Post date:** [23 January 2023 13:48 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061/2 "2023-01-23T13:48:16Z")

</div>

In my case, everything was done according to the documentation and it didn't work, because the system firewall was cutting the connection between the OPCUA server and the Node-red server.

After the sysadmin opened the ports between the OPCUA and the Node-Red server, the issue was resolved and everything worked as it should.

Check the system firewall settings and try again, that might be the problem.

---

<div class="post-metadata">

**Author:** ![CESLBM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CESLBM](https://discourse.nodered.org/u/CESLBM)\
**Post date:** [24 January 2023 19:13 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061/3 "2023-01-24T19:13:57Z")

</div>

Hello OriolFM, Thank you very much for your reply. Due to my work, I won't be able to continue this project until next week at the earliest. I will try it as soon as I can at work.

---

<div class="post-metadata">

**Author:** ![CESLBM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CESLBM](https://discourse.nodered.org/u/CESLBM)\
**Post date:** [3 February 2023 11:40 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061/4 "2023-02-03T11:40:38Z")

</div>

Hi OriolFM, I thought back and indeed Node-Red was having problems connecting to opcua after updating the windows system. But I checked the firewall history and it didn't close anything. After I turned off the firewall, the connection still didn't work.☹

---

<div class="post-metadata">

**Author:** ![CESLBM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CESLBM](https://discourse.nodered.org/u/CESLBM)\
**Post date:** [3 February 2023 15:05 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061/5 "2023-02-03T15:05:34Z")

</div>

Update I've opened all ports now, but still no successful connection. The state of the ports are SYN\_SENT

---

<div class="post-metadata">

**Author:** ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Post date:** [7 February 2023 09:28 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061/6 "2023-02-07T09:28:10Z")

</div>

The error messages you posted were consistent with the ones I got, and in my case, the problem were the ports. If not the ports, then I'd say look again at the Username/password on the OPC/UA server, since the error specifies that the Username& pass do not match the ones in the server.

You have to make sure that the user has the right permissions for read/write (whatever you want to do) and that the Username & password match the ones you use in Node-Red.

In your system, are both the OPC/UA server and NR deployed by you, or is the OPC/UA deployed by a third party?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 April 2023 09:29 UTC](https://discourse.nodered.org/t/problem-connection-between-node-red-and-opcua/74061/7 "2023-04-08T09:29:01Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
