Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error: listen EACCES: permission denied 0.0.0.0:80" #1

Closed
dynamicdave1515 opened this issue Jan 9, 2019 · 18 comments
Closed

"Error: listen EACCES: permission denied 0.0.0.0:80" #1

dynamicdave1515 opened this issue Jan 9, 2019 · 18 comments
Labels
documentation It will be documented

Comments

@dynamicdave1515
Copy link

Just tried your node in Node-RED v0.20.0 and got this error message from the Hub node

"Error: listen EACCES: permission denied 0.0.0.0:80"

@datech
Copy link
Owner

datech commented Jan 9, 2019

Ports under 1024 needs Node-Red to be started with root user or you can use docker containers, like Home Assistant is doing to run Node-Red. I will update the documntation to refrect this dowside

@datech datech changed the title Just tried your node "Error: listen EACCES: permission denied 0.0.0.0:80" Jan 9, 2019
@datech datech added the documentation It will be documented label Jan 9, 2019
@rapejim
Copy link

rapejim commented Jan 10, 2019

I am running Node-RED with a docker container and I configure the port 80 to be published port:

image

But I recive the same error:
"Error: listen EACCES 0.0.0.0:80"
image

@datech
Copy link
Owner

datech commented Jan 10, 2019

Is process running with root user inside the docker container?

@rapejim
Copy link

rapejim commented Jan 10, 2019

It's not running as root:
image
But, I don't know how change it (inside the container).

@rapejim
Copy link

rapejim commented Jan 10, 2019

When you release the #2 enhancement, I could configure it on another port (a port that isn't need root access) and redirect that port to external 80 port...
is it right?

@datech
Copy link
Owner

datech commented Jan 10, 2019

You may try to override the docker user with --user=root argument on docker run command

This has to switch node-red user to root

https://docs.docker.com/engine/reference/run/#user

PS: Port forwarding of port 80 should be working too

@rapejim
Copy link

rapejim commented Jan 10, 2019

You may try to override the docker user with --user=root argument on docker run command

This has to switch node-red user to root

https://docs.docker.com/engine/reference/run/#user

PS: Port forwarding of port 80 should be working too

SOLVED!! Y have changed the run user to root (in Portainer, the docker webui) and now it's "conected" without port error.
image
But Alexa don't discover the new device "Cargador patín"... (I have Echo Dot 3gen). 🤔

@datech
Copy link
Owner

datech commented Jan 10, 2019

Could you verify the that you can open the following link which will be served by Amazon Echo Hub Node
http://<node-red-ip-address>:80/description.xml (Just replace the host with your Node-Red IP address)

Echo device will try to access this link during the discovery process

@rapejim
Copy link

rapejim commented Jan 10, 2019

I have this info:
image

@datech
Copy link
Owner

datech commented Jan 10, 2019

Thanks.

Ok, this is the expected XML.

That’s odd. I suppose, that both Node-Red and Echo are in the same network?

@rapejim
Copy link

rapejim commented Jan 10, 2019

Node-Red (on a Raspi) and Echo are connected at the same wifi (my unique router).

@datech
Copy link
Owner

datech commented Jan 10, 2019

I managed to reproduce it. The problem is that Amazon Echo Hub could not be discovered with SSDP.
If the container is running in isolated network, multicast messages cannot be delivered to it.

In order to fix it you have to select host network while deploying the docker container. Here is how you can do in Portainer:
node-red amazon echo alexa

@rapejim
Copy link

rapejim commented Jan 11, 2019

I managed to reproduce it. The problem is that Amazon Echo Hub could not be discovered with SSDP.
If the container is running in isolated network, multicast messages cannot be delivered to it.

In order to fix it you have to select host network while deploying the docker container. Here is how you can do in Portainer:
node-red amazon echo alexa

Yeah, this change solve de ports problem.
But when I add new node, (for new device), I must restart NodeRED, then Alexa detect the new device. If I don't restart NodeRED, Alexa don't detect new device...
The Mysteries of Technology 🤣

@dynamicdave1515
Copy link
Author

dynamicdave1515 commented Jan 12, 2019

I'm trying out the latest release and wanted to know...
Do you know the port number the Echo Dot Gen-2 listens on (or how I could find that out) ?

@datech
Copy link
Owner

datech commented Jan 12, 2019

Echo Dot 2 gen has to be able to connect to any port above 1024.

PS: I don't have Dot 2 Gen to test it.

@datech
Copy link
Owner

datech commented Jan 14, 2019

Hello David

I will close this issue as there is a confirmation that the packages is working with Echo Dot 2 Gen.

https://discourse.nodered.org/t/amazon-echo-hub/6724/6

Fill free to open another issue if you find any bug or missing functionality.

Thanks.

@ChazBurkhart
Copy link

You may try to override the docker user with --user=root argument on docker run command
This has to switch node-red user to root
https://docs.docker.com/engine/reference/run/#user
PS: Port forwarding of port 80 should be working too

SOLVED!! Y have changed the run user to root (in Portainer, the docker webui) and now it's "conected" without port error.
image

I'm having this same issue, but I went to that link I have no idea what it's saying. Can you help me dumb it down a bit? I'm still very new to all of this.

@cbrandlehner
Copy link

My node-red environment is running non-root and I did not want to change this.

To be able to bind to port 80 you can also use this command to allow non-root processes to bind to port 80.

sysctl -w net.ipv4.ip_unprivileged_port_start=80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation It will be documented
Projects
None yet
Development

No branches or pull requests

5 participants