Not sure if this is a bug specific to the Docker release or to my environment (QNAP NAS) but I've installed Node-RED 0.20.7 (Both v8 and v10 to rule out an issue with one specific version) and it works fine, starts up in a few seconds as expected, flows all save fine (/data pointing to host volume) and restart is quick. The problem is as soon as I do a "npm install node-red-node-xxxx" that upon restarting the container the entire network stack doesn't seem to come up for around 18 mins (cannot connect to NR port, does not respond to ICMP, appears entirely offline).
Now ordinarily I'd put this down to an issue with the host, however, the strange thing is that the network and Node-RED comes up immediately after executing an npm command such as installing another node, even "npm audit" results in the container going 100% operational after the audit process completes (a few seconds).
If I fire up another container with /data pointing to the same host volume, all nodes appear as available in the flow builder so it doesn't appear to be an issue specific to a particular node either (I've tried node-mysql and node-twilio both give the same result). STDOUT shows no errors that might indicate an issue.
What could be going wrong? Why does it take 18 mins to start (despite STDOUT showing that it is running after a few seconds) but starts if I connect to the container and run an npm command? What is the process in doing an "npm install node-red-node-xxx" that is different to the node already existing in the data folder?
I had PingPlotter running so I could time and see how long it took to come up. This is the output:
> firstname.lastname@example.org start /usr/src/node-red > node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data" 25 Jul 01:01:50 - [info] Welcome to Node-RED =================== 25 Jul 01:01:51 - [info] Node-RED version: v0.20.7 25 Jul 01:01:51 - [info] Node.js version: v10.16.0 25 Jul 01:01:51 - [info] Linux 4.14.24-qnap x64 LE 25 Jul 01:01:53 - [info] Loading palette nodes 25 Jul 01:02:06 - [warn] rpi-gpio : Raspberry Pi specific node set inactive 25 Jul 01:02:06 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library 25 Jul 01:02:08 - [info] Settings file : /data/settings.js 25 Jul 01:02:08 - [info] Context store : 'default' [module=memory] 25 Jul 01:02:08 - [info] User directory : /data 25 Jul 01:02:08 - [warn] Projects disabled : editorTheme.projects.enabled=false 25 Jul 01:02:08 - [info] Flows file : /data/flows.json 25 Jul 01:02:08 - [info] Creating new flow file 25 Jul 01:02:08 - [info] Starting flows 25 Jul 01:02:08 - [info] Started flows 25 Jul 01:02:08 - [info] Server now running at http://127.0.0.1:1880/