# OPC UA connection timeout/error | catch node

**URL:** <https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511>\
**Category:** General\
**Created:** [11 May 2022 14:11 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511 "2022-05-11T14:11:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![learnobyte](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@learnobyte](https://discourse.nodered.org/u/learnobyte)\
**Post date:** [11 May 2022 14:11 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/1 "2022-05-11T14:11:50Z")

</div>

Hi,  
I need to display a message in the dashboard when the OPC UA server is down/not connected. I have used "catch" node, not catching the error, still not displaying the connection time out error in debug window.

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

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 May 2022 14:15 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/2 "2022-05-11T14:15:31Z")

</div>

> [@learnobyte](#):
>
> I have used "catch" node, not catching the error

Then the node is either not throwing an error or not throwing it properly (with a `msg` property for its 2nd parameter)

You more likely want to use the status node pointed at the UA client node.

Out of curiosity, what on earth is inside those 2 HUUUUGE (and completely unmanageable) functions?

---

<div class="post-metadata">

**Author:** ![learnobyte](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@learnobyte](https://discourse.nodered.org/u/learnobyte)\
**Post date:** [11 May 2022 14:29 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/3 "2022-05-11T14:29:06Z")

</div>

Hi steve,

The two huge functions are subscribing 42 items/datapoint items from opc ua server.I don't know how to read multiple items from the server and get multiple payloads. I got the reference from the forum.just tried.

> [@OPC UA Client Node - subscription limitation](https://discourse.nodered.org/t/opc-ua-client-node-subscription-limitation/62340):
>
> Hi all, I am using OPC UA client node to subscribe data points, Is there any limitation in terms number of client nodes. I have used 24 nodes, after that if I add nodes again, shows only subscription id, and payload, some number, but no data. If I disable 2 or 3 nodes, showing data Before disabling nodes: After disabling 3 nodes: I am getting payload, working fine Is there any limitation/maximum for subscription points , like 25 datapoints

I posted in the forum before I used multiple clients to read each item, but there is a limitation of only 24 nodes, after that not able to subscribe.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/65ffe43b85cc25a38ef94b102165e61c276f3efd.png)

how to use the status node?

---

<div class="post-metadata">

**Author:** ![anassettijare](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anassettijare/32/61447_2.png) [@anassettijare](https://discourse.nodered.org/u/anassettijare)\
**Post date:** [11 May 2022 14:50 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/4 "2022-05-11T14:50:24Z")

</div>

the OPC client session limit that you can open depends on your OPC UA server for example in industrial PLCs, depending on the performance of the PLC you have the maximum number of sessions that you can open, if your server can open 50 means you can make 50 opc ua client connections in node-red

[image]

---

<div class="post-metadata">

**Author:** ![anassettijare](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anassettijare/32/61447_2.png) [@anassettijare](https://discourse.nodered.org/u/anassettijare)\
**Post date:** [11 May 2022 14:54 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/5 "2022-05-11T14:54:06Z")

</div>

can you send the code that you made in the bloc function " From server ", i need it in my project also, thank you !

---

<div class="post-metadata">

**Author:** ![learnobyte](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@learnobyte](https://discourse.nodered.org/u/learnobyte)\
**Post date:** [11 May 2022 14:57 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/6 "2022-05-11T14:57:53Z")

</div>

msg1={};  
......................................

msg1.topic="ns=2;s=/Channel/LogicalSpindle/speedOvr;datatype=Double";  
.....................................

return [msg1,.................................];

To read from server

---

<div class="post-metadata">

**Author:** ![learnobyte](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@learnobyte](https://discourse.nodered.org/u/learnobyte)\
**Post date:** [11 May 2022 14:59 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/7 "2022-05-11T14:59:07Z")

</div>

msg1={};  
....................................

if(msg.topic=="ns=2;s=/Channel/LogicalSpindle/speedOvr;datatype=Double")  
{  
msg1.payload=msg.payload;  
msg1.topic="speedoverride";  
return [msg1,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];  
}

after reading client

---

<div class="post-metadata">

**Author:** ![anassettijare](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anassettijare/32/61447_2.png) [@anassettijare](https://discourse.nodered.org/u/anassettijare)\
**Post date:** [11 May 2022 15:25 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/8 "2022-05-11T15:25:35Z")

</div>

thank you very much !!

---

<div class="post-metadata">

**Author:** ![learnobyte](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@learnobyte](https://discourse.nodered.org/u/learnobyte)\
**Post date:** [11 May 2022 15:33 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/9 "2022-05-11T15:33:07Z")

</div>

welcome @anassettijare

---

<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:** [25 May 2022 15:34 UTC](https://discourse.nodered.org/t/opc-ua-connection-timeout-error-catch-node/62511/10 "2022-05-25T15:34:02Z")

</div>

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