hassio-addons/addon-node-red

Node-RED restart loop #584

HorizonKane posted onGitHub

Problem/Motivation

After upgrading HomeAssistant on hassio to 0.110.5, HassOS to 4.9 and Node-RED to 6.3.0, Node-RED keeps restarting all the time, throwing the following into the log:

[10:51:33] INFO: Starting Node-RED... addon-node-red@ start /opt node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js" 6 Jun 10:51:36 - [info] Welcome to Node-RED =================== 6 Jun 10:51:36 - [info] Node-RED version: v1.0.6 6 Jun 10:51:36 - [info] Node.js version: v12.15.0 6 Jun 10:51:36 - [info] Linux 5.4.42-v7l arm LE 6 Jun 10:51:37 - [info] Loading palette nodes 6 Jun 10:51:41 - [info] Dashboard version 2.22.1 started at /endpoint/ui Traceback (most recent call last): File "/opt/node_modules/node-red-node-pi-gpio/testgpio.py", line 4, in <module> import RPi.GPIO as GPIO File "/usr/lib/python2.7/site-packages/RPi/GPIO/init.py", line 23, in <module> from RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi! 6 Jun 10:51:42 - [warn] rpi-gpio : Raspberry Pi specific node set inactive 6 Jun 10:51:42 - [info] Settings file : /etc/node-red/config.js 6 Jun 10:51:42 - [info] Context store : 'default' [module=memory] 6 Jun 10:51:42 - [info] User directory : /config/node-red/ 6 Jun 10:51:42 - [warn] Projects disabled : editorTheme.projects.enabled=false 6 Jun 10:51:42 - [info] Flows file : /config/node-red/flows.json 6 Jun 10:51:42 - [info] Server now running at http://127.0.0.1:46836/ 6 Jun 10:51:42 - [info] Starting flows 6 Jun 10:51:43 - [info] Started flows 6 Jun 10:51:43 - [red] Uncaught Exception: 6 Jun 10:51:43 - Api Error: Unexpected response status; 404 at requireStatusCode200 (/config/node-red/node_modules/node-hue-api/hue-api/httpPromise.js:100:15) at _fulfilled (/config/node-red/node_modules/q/q.js:787:54) at /config/node-red/node_modules/q/q.js:816:30 at Promise.promise.promiseDispatch (/config/node-red/node_modules/q/q.js:749:13) at /config/node-red/node_modules/q/q.js:557:44 at flush (/config/node-red/node_modules/q/q.js:108:17) at processTicksAndRejections (internal/process/task_queues.js:76:11) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! addon-node-red@ start: node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the addon-node-red@ start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-06-06T08_51_43_992Z-debug.log [10:51:44] INFO: Starting Node-RED...

Expected behavior

Node-RED actually starting.

Actual behavior

Keeps restarting.

Steps to reproduce

I updated to the most current version. Regarding to the log, the installed hue api might be the problem.

Proposed changes

I would like to know if there is a way to remove the hue-api and then see if it works again. However, I can't find the correct folders on my HassOS shell. I already reinstalled Node-RED with no success.


:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be useful.

posted by addons-assistant[bot] almost 5 years ago

There is an issue with node-hue-api, which is not provided by this add-on. Please report your issues with that node.

posted by frenck almost 5 years ago

But can't you just tell me how to get rid of it? Isn't there a way to just delete it without NR running?

posted by HorizonKane almost 5 years ago

I don't know what it beholds? I've not used it before, nor is it provided by the add-on.

posted by frenck almost 5 years ago

Okay, thank you anyways!

posted by HorizonKane almost 5 years ago

Hi frenck,

Sorry to bother you again, I understand that node-hue-api is not part of the hassio addon. However the hassio addon differs from a standard installation and therefore I am a little bit lost. The node-hue-api documentation says it will be installed through npm (I want to try an update or uninstall of the api and get no reaction there) but npm is notworking on my hassio shell. Do I have to enter a virtual environment or container or something to do so for the addon?

Would be cool if I still knew how I installed it in the first place... but I don't and I'm completely stuck.

posted by HorizonKane almost 5 years ago

Got it fixed by simply deleting the node-hue-api folder in nod_modules. Tried that before, dunno why it is working now.

posted by HorizonKane almost 5 years ago

Aaaaaand it magically reappears. I managed to enter the docker container and tried to get rid of it with npm uninstall node-hue-api but get an error that make is missing :(

Entered docker container, removed it with "npm prune node-hue-api", deleted the folder in node_modules - NodeRED is running. Clicked restart, folder reappeared again, NodeRED not starting again.

Screw it.

posted by HorizonKane almost 5 years ago

Next try:

Enter docker container npm uninstall node-hue-api delete node-hue-api folder in node_modules

NodeRED is running.

Hitting restart or something: node-hue-api reappers stopping Node-RED from running. Uninstalling and reinstalling Node-RED: node-hue-api folde reappears, stopping NodeRED from running.

posted by HorizonKane almost 5 years ago

OK, I fixed it (more or less):

Save node-red folder in config to local PC Uninstall Node-RED plugin delete node-red folder in config install NodeRed Copy back flows.json Reinstall now missing throttle node from palette

So the problem was that some palette node for hue used node-hue-api and installed it each time at start.

posted by HorizonKane almost 5 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

posted by addons-assistant[bot] almost 5 years ago

Fund this Issue

$0.00
Funded

Pull requests