# OPC UA Client reconnects frequently

**URL:** https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521
**Category:** General
**Tags:** opcua
**Created:** [8 December 2023 10:24 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521 "2023-12-08T10:24:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![haph-vi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haph-vi/32/49126_2.png) [@haph-vi](https://discourse.nodered.org/u/haph-vi)
#### Post date: [8 December 2023 10:24 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521/1 "2023-12-08T10:24:01Z")

</div>

Hi,

I'm using many OPC UA Clients within a flow to connect to many different OPC UA Servers to check if they are still online (Data is fetched from an other Client. Servers have other problems that they fail sometimes, therefore the check with Node-RED). It worked until a few weeks ago as expected. The Client connects and a READ request of one nodeID is sent. Then every 15s the same READ request is sent again. The status of the client is always "active reading".  
Then every Client showed the same strange behavior, although nothing was updated or changed in my knowledge. Every client was reconnecting every ~60s. The status stays at "connected re-established". To stop the reading, the inject node was disabled but the reconnects still happened, even more often at ~4x per second. This is a tcpdump screenshot:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/8466cec92573478e69580ff85aafd52a55ac7a17.png)

On the server there were logged creating new secureChannels in the same rate:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0e321a6aaf33249165b7f32cba706c80acbb1c79.png)

Even after disabling the clients with deploy and then also the endpoint config node with a deploy, this still happened. Only a restart of the podman container stopped this. Activating the nodes again startet the behavior again. Activating the inject nodes again slowed this down to once every minute.

The trace log showed this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/3/d3ad891023dda766d399104a29904cc2d0e064c2.png)

I have 4 containers running:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/3115cddb6fd230ff7070ffbe731b53873e9bf31d.png)  
Red is where the above happens.  
2 of the 0.2.318 or 0.2.320 were updated after I noticed this, but I don't know which version I had before.

I noticed it because an other OPC UA client couldn't connect anymore, then I saw this what I wrote above.

So my question is, what can cause this behavior? Is this a known bug that I didn't manage to find online? What can I do to investigate it deeper?  
I certainly sure it's not my mistake because it worked for a longer time before in this configuration.

Thanks and best regards,  
haph

---

<div class="post-metadata">

### Author: ![mikakaraila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikakaraila/32/37496_2.png) [@mikakaraila](https://discourse.nodered.org/u/mikakaraila)
#### Post date: [15 December 2023 10:16 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521/2 "2023-12-15T10:16:57Z")

</div>

Check first that both computers are at same time

---

<div class="post-metadata">

### Author: ![haph-vi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haph-vi/32/49126_2.png) [@haph-vi](https://discourse.nodered.org/u/haph-vi)
#### Post date: [3 January 2024 13:55 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521/3 "2024-01-03T13:55:51Z")

</div>

They are at the same time, all are synchronized with the same time server. I had the time error before and it looks different than the current error.

---

<div class="post-metadata">

### Author: ![mikakaraila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikakaraila/32/37496_2.png) [@mikakaraila](https://discourse.nodered.org/u/mikakaraila)
#### Post date: [29 January 2024 10:54 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521/4 "2024-01-29T10:54:14Z")

</div>

I will publish new version today/later this week, please re-test with it.

---

<div class="post-metadata">

### Author: ![haph-vi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haph-vi/32/49126_2.png) [@haph-vi](https://discourse.nodered.org/u/haph-vi)
#### Post date: [29 January 2024 12:40 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521/5 "2024-01-29T12:40:53Z")

</div>

We'll set up a new Node-RED server in a week or two. Once the server is up, I'll install node.js, Node-RED and Node-RED OPC UA in the newest version for every instance.  
Then I'll report back.

Thank you!!

---

<div class="post-metadata">

### Author: ![haph-vi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haph-vi/32/49126_2.png) [@haph-vi](https://discourse.nodered.org/u/haph-vi)
#### Post date: [13 February 2024 09:07 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521/6 "2024-02-13T09:07:12Z")

</div>

So just tested the first OPC UA Client and it seems solved. I'll let this thread open for a week and close it, when no error is detected within this time.

---

<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: [13 April 2024 09:07 UTC](https://discourse.nodered.org/t/opc-ua-client-reconnects-frequently/83521/7 "2024-04-13T09:07:51Z")

</div>

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