Intermittent ADS connection


So, I have a Beckhoff PLC sending data via ADS to a Siemens IoT gateway running Debian. There, Node-RED (node v14.20.1, node-red v3.0.2) is gathering and sending data via OPC UA to a few other locations. (I wasn't responsible for this part of the system and have no way of contacting the person who was, so apologies if I'm missing some information and I'll try to find it if necessary)
Using node-red-contrib-ads, I have around 40 ADS Notification nodes receiving data every second and an ADS System node monitoring the connection.

The problem here is that the ADS connection fails every 10-20 seconds. It usually reconnects in 4-5 seconds and otherwise runs fine. I tried removing all ADS nodes other than the one monitoring the connection (it can fail for a single bad Notification node), but the issue persisted.
The logs and debug window just show the same error every time this happens. Posted below. (Elipsed ... the repeating error for ease of read)

If anyone has any idea of what might be causing this, it'd be highly appreciated. Even a vague idea would help at this point.



14 Oct 09:48:04 - [error] [ads-connection:3d7b4b34.c471e4] Error ADS: Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:468:14)
    at Object.runCommand (/root/.node-red/node_modules/node-ads-api/lib/ads.js:1028:17)
    at Object.writeCommand (/root/.node-red/node_modules/node-ads-api/lib/ads.js:893:14)
    at Object.releaseSymHandle (/root/.node-red/node_modules/node-ads-api/lib/ads.js:831:18)
    at Object.releaseSymHandles (/root/.node-red/node_modules/node-ads-api/lib/ads.js:816:22)
    at Object.end (/root/.node-red/node_modules/node-ads-api/lib/ads.js:179:21)
    at (/root/.node-red/node_modules/node-ads-api/lib/ads.js:56:16)
    at internalRestart (/root/.node-red/node_modules/node-red-contrib-ads/ads-connection.js:425:13)
    at Timeout.<anonymous> (/root/.node-red/node_modules/node-red-contrib-ads/ads-connection.js:159:11)
    at listOnTimeout (internal/timers.js:557:17) {
  code: 'EPIPE'
14 Oct 09:48:22 - [error] [ads-connection:3d7b4b34.c471e4] ...
14 Oct 09:48:40 - [error] [ads-connection:3d7b4b34.c471e4] ...
14 Oct 09:48:58 - [error] [ads-connection:3d7b4b34.c471e4] ...
14 Oct 09:49:16 - [error] [ads-connection:3d7b4b34.c471e4] ...
14 Oct 09:49:37 - [error] [ads-connection:3d7b4b34.c471e4] ...

Flow, even though it's just this one node:

        "id": "aef3da02.b73fb8",
        "type": "ADS System",
        "z": "96af571f.92e238",
        "name": "",
        "datasource": "3d7b4b34.c471e4",
        "useInputMsg": false,
        "topic": "",
        "x": 250,
        "y": 160,
        "wires": [
        "id": "3d7b4b34.c471e4",
        "type": "ads-connection",
        "host": "",
        "clientIP": "",
        "amsNetIdTarget": "",
        "amsNetIdSource": "",
        "port": "48898",
        "amsPortSource": "32905",
        "amsPortTarget": "851",
        "adsTimeout": "2000"

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