hassio-addons/addon-node-red

Bootloop #421

eopo posted onGitHub

Problem/Motivation

NodeRed does not properly start

Expected behavior

Server boot

Actual behavior

Bootloop:

9 Jan 08:33:05 - [info] 
Welcome to Node-RED
===================
9 Jan 08:33:05 - [info] Node-RED version: v1.0.3
9 Jan 08:33:05 - [info] Node.js  version: v12.14.0
9 Jan 08:33:05 - [info] Linux 4.19.88-v7l arm LE
9 Jan 08:33:06 - [info] Loading palette nodes
9 Jan 08:33:10 - [info] Dashboard version 2.19.3 started at /endpoint/ui
9 Jan 08:33:11 - [info] Settings file  : /etc/node-red/config.js
9 Jan 08:33:11 - [info] Context store  : 'default' [module=memory]
9 Jan 08:33:11 - [info] User directory : /config/node-red/
9 Jan 08:33:11 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Jan 08:33:11 - [info] Flows file     : /config/node-red/flows.json
9 Jan 08:33:11 - [info] Server now running at http://127.0.0.1:46836/
9 Jan 08:33:11 - [info] Starting flows
9 Jan 08:33:11 - [info] Started flows
9 Jan 08:33:16 - [red] Uncaught Exception:
9 Jan 08:33:16 - Error: Invalid URL: ws3.fritz.box:8123/api/websocket
    at initAsClient (/config/node-red/node_modules/ws/lib/websocket.js:484:11)
    at new WebSocket (/config/node-red/node_modules/ws/lib/websocket.js:72:7)
    at connect (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/lib/ha-websocket.js:352:28)
    at Timeout._onTimeout (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/lib/ha-websocket.js:416:23)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hassio-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 hassio-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-01-09T07_33_16_520Z-debug.log
[08:33:16] INFO: Starting Node-RED...
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"

Steps to reproduce

Fresh hass.io install with changed hostname, added NodeRED-Addon via hass.io (No HACS was used for that)

Proposed changes

Seems to generate a wrong url. The proper URL would be rpi03.fritz.box, since rpi03 is the hostname. I couldn't find a file containing the wrong string.


: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] over 5 years ago

ws3.fritz.box is not used by the add-on, nor does the add-on use any of the configured hostnames.

I suspect you already had a node-red folder in your configuration directory that might contain older/previous information?

posted by frenck over 5 years ago

I'm having the same issue. In my case, I'm running within docker and changed the URL to an IP address and see that the beginning has also been replaced with 'ws'. Only the data directory is mounted and I can't figure out where its storing the connection details.

posted by cvetand over 5 years ago

From an add-on perspective, there is not much I can do about this. This is the internals of Node-RED or its nodes used...

posted by frenck about 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] about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests