addon-node-red
addon-node-red copied to clipboard
Node-RED crashed, halting add-on
Problem/Motivation
For a few days now I have problems with node-red. Everything is up to date with the latest version but now the addon is always giving an error and shuts down without me knowing what it is.
I didn't make any changes to node-red, I just made updates.
thanks
`s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/00-banner.sh
Add-on: Node-RED Flow-based programming for the Internet of Things
Add-on version: 13.2.0 You are running the latest version of this add-on. System: Debian GNU/Linux 11 (bullseye) (amd64 / qemux86-64) Home Assistant Core: 2022.7.7 Home Assistant Supervisor: 2022.07.0
Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/customizations.sh
cont-init: info: /etc/cont-init.d/customizations.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/node-red.sh
patching file nodes/ui_base.html
Hunk #1 succeeded at 1164 (offset 633 lines).
up to date, audited 151 packages in 1s
34 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
cont-init: info: /etc/cont-init.d/node-red.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun nodered (no readiness notification)
s6-rc: info: service legacy-services successfully started
[23:23:16] INFO: Starting Node-RED...
start node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js" 27 Jul 23:23:17 - [info] Welcome to Node-RED =================== 27 Jul 23:23:17 - [info] Node-RED version: v3.0.1 27 Jul 23:23:17 - [info] Node.js version: v16.16.0 27 Jul 23:23:17 - [info] Linux 5.10.0-9-amd64 x64 LE 27 Jul 23:23:18 - [info] Loading palette nodes 27 Jul 23:23:21 - [info] Dashboard version 3.1.7 started at /endpoint/ui 27 Jul 23:23:21 - [info] Settings file : /etc/node-red/config.js 27 Jul 23:23:21 - [info] Context store : 'default' [module=memory] 27 Jul 23:23:21 - [info] User directory : /config/node-red/ 27 Jul 23:23:21 - [warn] Projects disabled : editorTheme.projects.enabled=false 27 Jul 23:23:21 - [info] Flows file : /config/node-red/flows.json 27 Jul 23:23:21 - [info] Server now running at http://127.0.0.1:/ 27 Jul 23:23:22 - [info] Starting flows [23:23:22] INFO: Starting NGinx... 27 Jul 23:23:23 - [info] [cronplus:c.] createTask - index: 0, static: true, opt: {"name":"schedule1","topic":"schedule1","payloadType":"default","payload":"","expressionType":"cron","expression":"0 * * * ","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"} 27 Jul 23:23:23 - [info] Started flows 27 Jul 23:23:23 - [info] [mqtt-broker:.] Connected to broker: mqtt://*:1883 27 Jul 23:23:27 - [info] [server:Home Assistant] Connecting to http://supervisor/core 27 Jul 23:23:27 - [info] [server:Home Assistant] Connected to http://supervisor/core Received state update for unknown entity sensor.template_sidebar Received event for unknown subscription 3. Unsubscribing. Received event for unknown subscription 3. Unsubscribing. Received event for unknown subscription 3. Unsubscribing. Received event for unknown subscription 3. Unsubscribing. 27 Jul 23:24:00 - [red] Uncaught Exception: 27 Jul 23:24:00 - [error] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>". [23:24:00] WARNING: Node-RED crashed, halting add-on s6-rc: info: service legacy-services: stopping [23:24:00] INFO: Node-RED stoped, restarting... [23:24:00] INFO: Node-RED stoped, restarting... s6-svwait: fatal: supervisor died s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped`
(Why the issue was filed)
Expected behavior
(What you expected to happen)
Actual behavior
(What actually happened)
Steps to reproduce
(How can someone else make/see it happen)
Proposed changes
(If you have a proposed change, workaround or fix, describe the rationale behind it)
RESOLVED:
Addon keeps crashing too, I haven't been able to capture the logs so far.
UPDATE with logs, this seems to happen exactly when a cron job got triggered:
31 Jul 08:00:17 - [red] Uncaught Exception: 31 Jul 08:00:17 - [error] TypeError: node.error is not a function at errorHandler (/opt/node_modules/node-red-contrib-cast/cast-to-client.js:52:10) at getSpeechUrl (/opt/node_modules/node-red-contrib-cast/cast-to-client.js:192:9) at Timeout._onTimeout (/opt/node_modules/node-red-contrib-cast/cast-to-client.js:836:33) at listOnTimeout (node:internal/timers:561:11) at processTimers (node:internal/timers:502:7) [08:00:17] WARNING: Node-RED crashed, halting add-on [08:00:17] INFO: Node-RED stoped, restarting... s6-rc: info: service legacy-services: stopping [08:00:18] INFO: Node-RED stoped, restarting... s6-svwait: fatal: supervisor died s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping [08:00:18] INFO: nginx stoped, restarting... s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped
Step to fix: -Replace all nodes from node-red-contrib-cast to node-red-contrib-castv2. -make sure to add all your devices first then send to cast using the documentation provided.
I am having the same issue. Node red is stopping at least once a day for me too and I don't know why. I am just starting to transition to node red because it sounded interesting but if I can't trust automations to run with node red then I might go back to the HA automations. Was really hoping this would work.
Experiencing the same issue, crashes at least once a day and restarts without any issue
It is similar with me. NR starts together with HA, then stops after some time for unknown reasons. After starting NR, the add-on starts ok. And again after some time it stops. A Utracono gain and again. Raspberry Pi 4b, 64, Home Assistant 2022.8.4, Supervisor 2022.08.3, Operating System 8.4
Similar here, Node Red crashes once or twice a day. But the Watchdog does not restart the Add-On. Then I have to manually start Node-Red again.
Add-on version: 13.3.1 You are running the latest version of this add-on. System: Home Assistant OS 8.4 (armv7 / raspberrypi3) Home Assistant Core: 2022.8.4 Home Assistant Supervisor: 2022.08.3
Update: it is getting worse. now it crashes after a few minutes.
best regards
Seems that node-red-contrib-cast caused the error. I deactivated all Cast Nodes and since then Node Red is running without interruptions.
@TurboKanne have you tried updating other nodes?
I disabled an integration to a battery storage system. This stopped the random crashes. I then found I was unable to update nodes to the latest version.
I am having the same issue with Node Red v.13.2. Seems to have started every since I upgraded to 2022.8.x. Every time I restart HA or after random period of time, the addon crashes, and all of my flows stop. I usually reload the integration and restart the web UI to get it working again, but this is getting to a bit annoying now. Not using any experimental nodes that I know of, and everything seems to be up-to-date. Hope we can get a resolution soon!
@TurboKanne have you tried updating other nodes?
I disabled an integration to a battery storage system. This stopped the random crashes. I then found I was unable to update nodes to the latest version.
All nodes that are in use are currently up-to-date. I checked the installation palette. No open updates for specific nodes so far. Since I disabled all cast-nodes within my flows, NR did not crash again.
I disabled all of the cast nodes and noticed that node-red loaded much quicker than before. You may be onto something. I am monitoring this now to see if it crashes
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!