node-red-contrib-alexa-home icon indicating copy to clipboard operation
node-red-contrib-alexa-home copied to clipboard

node red Error: listen EACCES: permission denied 0.0.0.0:80

Open blue-danube-vienna opened this issue 3 years ago • 2 comments
trafficstars

Hi!

After update from 1.4.0 to 2.0.0 the message "node red Error: listen EACCES: permission denied 0.0.0.0:80" appears.

I have nginx with proxy_pass to port 60000 installed.

iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 60000 does even not work...

is the port 60000 disabled in 2.0.0 ??

please help best regards blue_danube

blue-danube-vienna avatar Jul 09 '22 00:07 blue-danube-vienna

No the port is not disabled, but the default port is set to 80. But of course this should not be overwritten on existing configurations/setups. You can also use the proxy method that your nodered installations webserver is used for all communication.

mabunixda avatar Jul 11 '22 10:07 mabunixda

I have had an existing installation. After the update in node-red via manage palette and a restart node-red no longer started.. The node-red log says "node red Error: listen EACCES: permission denied 0.0.0.0:80"

As an emergency solution, I set the sysctl -w net.ipv4.ip_unprivileged_port_start=80 and deactivated nginx, but that's not a permanent solution either.

blue-danube-vienna avatar Jul 11 '22 19:07 blue-danube-vienna

Hi, sorry i had to push the topic because i can't solve the problem. I get the same error after the update and whatever i write in the port setup, it seams as the plugin use port 80 an node red crashed or was suspended (runnig as a service or with pi user). I dont want to use root and i did not understand the workaround from blue-danube. Can you help me please. How can i change the port to 60000 or another unprivileged port.

Finaly i also want to say thank you for your great work with the node!

Best Regards Grisu

GrisuLychen avatar Sep 19 '22 14:09 GrisuLychen

Alexa device need to communicate on port 80. ypu can try to use the proxy flag „use node as webserver“ on the latest version Bildschirmfoto 2022-09-19 um 16 49 00

here the webserver of nodered is used and no other is started.

mabunixda avatar Sep 19 '22 14:09 mabunixda

Hi mabunixda, thank you for your advice. Unfortunately it also dosn't work.

Because I didn't know what to do anymore, i read the files of the node and seach for port 80. And what shoud i say, i dont know why, but i found something and it seams to work. I change the "80" in /home/pi/.node-red/node_modules/node-red-contrib-alexa-home/alexa/alexa-helper.js to 8980 and restart node red. In my old setup i prerout the port 80 to 8980 like in the description of the node.

I did not check if alexa find new entries or lights but my homeserver worked for now in the old configuration an my home is a bit smarter again.

GrisuLychen avatar Sep 19 '22 18:09 GrisuLychen

Fine :) The information about prerouting was also missing on your last post ...

mabunixda avatar Sep 20 '22 05:09 mabunixda