user3373581
user3373581

Reputation: 1161

Application generating "Error: listen EACCES" while starting application with pm2 on port 80?

We are using pm2 for starting my nodejs app on port 80 on ubuntu. But the application generating error **Error: listen EACCES**. Our pm2 version is 0.12.7 and we are using the following command:

sudo pm2 start app.js -- dev

On running whereis node we get the following result:

node: /usr/bin/node /usr/sbin/node

We have already tried following commands:

sudo apt-get install libcap2-bin
sudo setcap cap_net_bind_service=+ep /usr/local/sbin/node

Any idea where are we going wrong?

Upvotes: 2

Views: 1377

Answers (1)

Jason Miesionczek
Jason Miesionczek

Reputation: 14448

Sounds like you might have another service already listening on port 80. try this:

sudo netstat -tulpn

The output of this will tell you if any other process is currently using port 80.

Upvotes: 2

Related Questions