Node Red startup issue "Permission Denied"

(I hope this is the right place to ask for help, it seemed to be most relevant category I could find)

I was unable to add the node-red-contrib-chatbot through the Node Red Pallette UI (it just spun for a while and then gave up). I added it to the npm_packages section of Node Red config but received several errors, after looking through the logs and some other threads, I figured out that I needed to add “make” to the system_packages of Node Red configuration, and then when starting it again I also had to add “g++”.

After doing that, it successfully loaded Node Red with the chatbot pallette, and it was working great. Then at some point I restarted Node Red and started getting an error. I thought perhaps I needed to remove these config changes now that the pallette was installled, but that resulted in Node Red reporting missing definitions. Adding those lines back to the Node Red config just starts throwing an error again, and Node Red won’t start up.

Here is my Node Red config:

{
  "log_level": "info",
  "credential_secret": "!secret nodered_credentialsecret",
  "http_node": {
    "username": "",
    "password": ""
  },
  "http_static": {
    "username": "",
    "password": ""
  },
  "port": 1880,
  "ssl": false,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_ssl": false,
  "system_packages": [
    "make",
    "g++"
  ],
  "npm_packages": [
    "node-red-contrib-chatbot"
  ],
  "init_commands": []
}

And here is the log that is output:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Node-RED v1.1.0
 Flow-based programming for the Internet of Things
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 armhf / HassOS 1.12 / HA 0.82.1 / SU 140 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-config.sh: executing... 
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 80-system-packages.sh: executing... 
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/armhf/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: Permission denied
WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/armhf/APKINDEX.tar.gz
v3.8.1-61-g338ad9f579 [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
v3.8.0-3273-g8fb6f6ed88 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v3.8.0-3273-g8fb6f6ed88 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v3.8.0-2843-gc2122a25c7 [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
1 errors; 16150 distinct packages available
FATAL: Failed updating Alpine packages repository indexes
[cont-init.d] 80-system-packages.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

Any help that anyone can provide would be great, the only error I see in there is about permission being denied for http://dl-cdn.alpinelinux.org/alpine/v3.8/main , but if I visit that URL in the browser it opens just fine, so it seems odd that it’s failing to fetch that item…

1 Like

OK… nevermind. It appears that after enough restarts it started working again, I guess it was just having a connection hiccup…

Alright, I guess I still do need help… after restarting Node Red again, I’ve started encountering this issue once more. I installed a different palette (light-scheduler) through the UI which worked just fine… which makes me wonder if having the chatbot palette installed as an NPM package every time Node Red starts is creating more potential points of failure.

Is there some other trick to getting a given palette to install from the UI? I don’t get any errors, and I don’t see any prereqs for the palette on the project’s page… am I fundamentally misunderstanding something? Is this an issue with how I have Node Red set up?

It certainly seems like if I’m intermittently getting a “Permission Denied” error that other people would be experiencing the same thing… that indicates an actual response from the server, which means it shouldn’t be anything on my end causing it… and the fact that it sometimes connects to that address without issue is definitely confusing.