Hi all, I have a node-red instance (runs in docker) that kept restarting whenever I did a git push within project.
3 Apr 08:05:11 - [info] Node-RED version: v3.0.2
3 Apr 08:05:11 - [info] Node.js version: v16.16.0
3 Apr 08:05:11 - [info] Linux 5.10.60-qnap x64 LE
For that particular instance I had setup project yesterday and noticed that git push failed and in the browser I was notified that the connection was lost and moments later regained.
After redeploying the container, restoring an old backup and recreating the project the error was still present.
Log file shows before each restart:
3 Apr 08:06:09 - [red] Uncaught Exception:
3 Apr 08:06:09 - [error] TypeError: Cannot read properties of null (reading 'cpu')
at /data/node_modules/node-red-contrib-process-resources/process_resources.js:61:75
at Array.forEach (<anonymous>)
at sendMessage (/data/node_modules/node-red-contrib-process-resources/process_resources.js:59:33)
at /data/node_modules/node-red-contrib-process-resources/process_resources.js:113:25
at /data/node_modules/pidusage/lib/stats.js:90:7
at each (/data/node_modules/pidusage/lib/helpers/parallel.js:24:15)
at /data/node_modules/pidusage/lib/helpers/parallel.js:32:9
at /data/node_modules/pidusage/lib/procfile.js:111:14
at /data/node_modules/pidusage/lib/procfile.js:43:5
at FSReqCallback.wrapper [as oncomplete] (node:fs:660:5)
3 Apr 08:06:12 - [info]
Welcome to Node-RED
===================
3 Apr 08:06:12 - [info] Node-RED version: v3.0.2
3 Apr 08:06:12 - [info] Node.js version: v16.16.0
3 Apr 08:06:12 - [info] Linux 5.10.60-qnap x64 LE
3 Apr 08:06:13 - [info] Loading palette nodes
3 Apr 08:06:13 - [info] Node-RED FlexDash plugin version 0.4.154
3 Apr 08:06:13 - [info] Node-RED Vue version 0.1.15
3 Apr 08:06:14 - [info] Creating Vue template for 'flexdash dashboard' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-dashboard.vue
3 Apr 08:06:14 - [info] Node-RED FlexDash version 0.4.154
3 Apr 08:06:14 - [info] Node-RED FD Core Widgets version 0.4.64
3 Apr 08:06:14 - [info] Creating Vue template for 'flexdash container' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-container.vue
3 Apr 08:06:14 - [info] Creating Vue template for 'flexdash tab' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-tab.vue
3 Apr 08:06:14 - [info] Creating Vue template for 'flexdash custom' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-custom.vue
03 Apr 08:06:15 - [info] RedBot version: 1.2.4 (node-red-contrib-chatbot)
3 Apr 08:18:46 - [red] Uncaught Exception:
3 Apr 08:18:46 - [error] TypeError: Cannot read properties of null (reading 'cpu')
at /data/node_modules/node-red-contrib-process-resources/process_resources.js:61:75
at Array.forEach (<anonymous>)
at sendMessage (/data/node_modules/node-red-contrib-process-resources/process_resources.js:59:33)
at /data/node_modules/node-red-contrib-process-resources/process_resources.js:113:25
at /data/node_modules/pidusage/lib/stats.js:90:7
at each (/data/node_modules/pidusage/lib/helpers/parallel.js:24:15)
at /data/node_modules/pidusage/lib/helpers/parallel.js:32:9
at /data/node_modules/pidusage/lib/procfile.js:111:14
at /data/node_modules/pidusage/lib/procfile.js:43:5
at FSReqCallback.wrapper [as oncomplete] (node:fs:660:5)
3 Apr 08:18:56 - [info]
Welcome to Node-RED
===================
3 Apr 08:18:56 - [info] Node-RED version: v3.0.2
3 Apr 08:18:56 - [info] Node.js version: v16.16.0
3 Apr 08:18:56 - [info] Linux 5.10.60-qnap x64 LE
3 Apr 08:18:57 - [info] Loading palette nodes
3 Apr 08:18:57 - [info] Node-RED FlexDash plugin version 0.4.154
3 Apr 08:18:57 - [info] Node-RED Vue version 0.1.15
3 Apr 08:18:58 - [info] Creating Vue template for 'flexdash dashboard' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-dashboard.vue
3 Apr 08:18:58 - [info] Node-RED FlexDash version 0.4.154
3 Apr 08:18:58 - [info] Node-RED FD Core Widgets version 0.4.64
3 Apr 08:18:58 - [info] Creating Vue template for 'flexdash container' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-container.vue
3 Apr 08:18:58 - [info] Creating Vue template for 'flexdash tab' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-tab.vue
3 Apr 08:18:58 - [info] Creating Vue template for 'flexdash custom' from /data/node_modules/@flexdash/node-red-flexdash/flexdash-custom.vue
03 Apr 08:18:59 - [info] RedBot version: 1.2.4 (node-red-contrib-chatbot)
The error was gone after I disabled the 1sec inject node before the process resources node (node-red-contrib-process-resources).
[{"id":"cdf66cfb22d2793a","type":"ui_chart","z":"deeaa35dbe5ee51c","name":"CPU - Line chart","group":"89749fb7.87f01","order":3,"width":"7","height":"6","label":"CPU per process - Line chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"100","removeOlderUnit":"3600","cutout":"30","useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":970,"y":140,"wires":[[]]},{"id":"1f27e7b00e21d17d","type":"change","z":"deeaa35dbe5ee51c","name":"CPU main","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.main.cpu","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"CPU main","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":100,"wires":[["cdf66cfb22d2793a"]]},{"id":"62ec78dcc422890b","type":"change","z":"deeaa35dbe5ee51c","name":"CPU children","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.cpuChildren","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"CPU children","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":140,"wires":[["cdf66cfb22d2793a"]]},{"id":"0ab7460febb7a54d","type":"change","z":"deeaa35dbe5ee51c","name":"CPU total","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.cpuTotal","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"CPU total","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":180,"wires":[["cdf66cfb22d2793a"]]},{"id":"ee1d323d938b76a4","type":"ui_chart","z":"deeaa35dbe5ee51c","name":"Memory -Line chart","group":"89749fb7.87f01","order":3,"width":"7","height":"6","label":"Memory per process - Line chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"100","removeOlderUnit":"3600","cutout":"30","useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1010,"y":280,"wires":[[]]},{"id":"34c28f6c52347fa5","type":"change","z":"deeaa35dbe5ee51c","name":"Memory main","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.main.memory","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Memory main","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":240,"wires":[["ee1d323d938b76a4"]]},{"id":"e79a7633f4eaeb91","type":"change","z":"deeaa35dbe5ee51c","name":"Memory children","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.memoryChildren","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Memory children","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":280,"wires":[["ee1d323d938b76a4"]]},{"id":"d8a3dc8a6d5d631c","type":"change","z":"deeaa35dbe5ee51c","name":"Memory total","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.memoryTotal","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Memory total","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":320,"wires":[["ee1d323d938b76a4"]]},{"id":"d4876cedf749a00b","type":"change","z":"deeaa35dbe5ee51c","name":"Process count","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.processCount","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Process count","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":380,"wires":[["312a72d7e7486377"]]},{"id":"312a72d7e7486377","type":"ui_chart","z":"deeaa35dbe5ee51c","name":"Process count - Line chart","group":"89749fb7.87f01","order":3,"width":"7","height":"6","label":"Process count - Line chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"100","removeOlderUnit":"3600","cutout":"30","useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":990,"y":380,"wires":[[]]},{"id":"b92483b542b2df4f","type":"inject","z":"deeaa35dbe5ee51c","name":"Every 1 seconds","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":330,"y":100,"wires":[["86e589dc497a4da1"]]},{"id":"86e589dc497a4da1","type":"process-resources","z":"deeaa35dbe5ee51c","name":"","process":"nodered","pidField":"payload","outputField":"payload","sortOrder":"asc","sortBy":"pid","analyzeChildren":true,"x":540,"y":100,"wires":[["1f27e7b00e21d17d","62ec78dcc422890b","0ab7460febb7a54d","34c28f6c52347fa5","d4876cedf749a00b","d8a3dc8a6d5d631c","e79a7633f4eaeb91"]]},{"id":"89749fb7.87f01","type":"ui_group","name":"Message Profiler","tab":"d7901f40.2659d","order":2,"disp":true,"width":"16","collapse":false,"className":""},{"id":"d7901f40.2659d","type":"ui_tab","name":"Charts","icon":"dashboard","order":40,"disabled":false,"hidden":false}]
The error is repeatable; with inject timer git push fails, without the timer it works.
Whom should I talk to, node-red core dev or author of contrib node?
EDIT:
I just saw that the author of node-red-contrib-process-resources seems to be @BartButenaers; adding him now.
EDIT 2:
JUst found that there is an issue (some days old) that looks quite similar: Crashes node-RED on ubuntu · Issue #1 · bartbutenaers/node-red-contrib-process-resources · GitHub