hassio-addons/addon-node-red





The issue has been closed
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.