<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to OPC-UA</title><link>https://forge.codesys.com/forge/talk/Runtime/thread/cad0b52ec0/</link><description>Recent posts to OPC-UA</description><language>en</language><lastBuildDate>Wed, 26 Aug 2026 10:12:03 -0000</lastBuildDate><atom:link href="https://forge.codesys.com/forge/talk/Runtime/thread/cad0b52ec0/feed.rss" rel="self" type="application/rss+xml"></atom:link><item><title>OPC-UA</title><link>https://forge.codesys.com/forge/talk/Runtime/thread/cad0b52ec0/?limit=25#d055</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am experiencing an intermittent OPC UA server issue on CODESYS Control for Raspberry Pi SL 4.21.0.0.&lt;br/&gt;
Runtime information:&lt;/p&gt;
&lt;p&gt;codesyscontrol 4.21.0.0&lt;br/&gt;
Raspberry Pi 4 Model B Rev 1.1 - 4Gb &lt;br/&gt;
OPC UA Server: CmpOPCUAServer 3.5.22.x&lt;br/&gt;
Server IP: 192.168.0.110&lt;br/&gt;
OPC UA endpoint: opc.tcp://192.168.0.110:4840&lt;/p&gt;
&lt;p&gt;The main OPC UA client is Node-RED running on 192.168.0.111. This has an active subscription with some tags and also some write functions active.&lt;br/&gt;
The system normally works correctly for a period, but at some time the OPC UA communication stopped.&lt;br/&gt;
Node-RED started reconnecting continuously but could not reconnect.&lt;br/&gt;
I also tried connecting using UaExpert, but UaExpert returned: BadTimeout&lt;/p&gt;
&lt;p&gt;At the same time, the PLC application itself was still running.&lt;br/&gt;
Before restarting CODESYS, I captured the TCP connections.&lt;br/&gt;
The OPC UA server was still listening:&lt;br/&gt;
tcp  11  0  192.168.0.110:4840  0.0.0.0:*  LISTEN&lt;/p&gt;
&lt;p&gt;However, there were many connections from the Node-RED client stuck in CLOSE_WAIT:&lt;br/&gt;
192.168.0.110:4840  192.168.0.111:45008  CLOSE_WAIT&lt;br/&gt;
192.168.0.110:4840  192.168.0.111:53678  CLOSE_WAIT&lt;br/&gt;
192.168.0.110:4840  192.168.0.111:44032  CLOSE_WAIT&lt;br/&gt;
192.168.0.110:4840  192.168.0.111:36612  CLOSE_WAIT&lt;br/&gt;
192.168.0.110:4840  192.168.0.111:45012  CLOSE_WAIT&lt;br/&gt;
192.168.0.110:4840  192.168.0.111:36592  CLOSE_WAIT&lt;br/&gt;
...&lt;/p&gt;
&lt;p&gt;Some of these sockets also had data remaining in Recv-Q, for example:&lt;br/&gt;
Recv-Q = 61&lt;br/&gt;
Recv-Q = 121&lt;br/&gt;
There were roughly 15–20 OPC UA connections in CLOSE_WAIT.&lt;br/&gt;
Restarting only the CODESYS runtime immediately restored OPC UA communication.&lt;br/&gt;
After restart:&lt;br/&gt;
LISTEN 0 10 192.168.0.110:4840&lt;br/&gt;
and both Node-RED and UaExpert can connect normally again. There are no obvious OPC UA errors during startup or in log.&lt;/p&gt;
&lt;p&gt;On RPI 2 I had a memory leak regarding OPCUA so I had to upgrade to RPI4. &lt;br/&gt;
What can I do in this case?&lt;br/&gt;
Thank you!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mariussandu</dc:creator><pubDate>Wed, 26 Aug 2026 10:12:03 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com6be4df6bb49906ebbe329e584072f5083f27c8a7</guid></item></channel></rss>