• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Passenger and Node.js - address 0.0.0.0:80 already in use

James Newton

New Pleskian
Hello friendly Plesk people :)

I want to run a node.js application in a sub-domain, using Passenger and nginx, but I get this error:

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

I have a new Ubuntu 16.04 server managed by Plesk Onyx 17.0.17. I have used Plesk to create a sub-domain where I want to experiment with Node.js and Phusion Passenger, from the command line. I have successfully followed this tutorial, until I get to the point where the Passenger Standalone on pass.mydomain.com is told to listen on port 80.

Here is the output from my Terminal session:

$ sudo passenger start --port 80 --user pass --environment production --daemonize
Could not start the Nginx engine:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()


I understand that if the web site created by Plesk for pass.mydomain.com is active, then there is already an instance of nginx serving up the default placeholder page. I had hoped that if I use the Plesk interface to suspend or disable the default site then this would free up port 80 for this subdomain, but this is not the case.

If I suspend the site, and visit it in my browser, I see this:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance
downtime or capacity problems. Please try again later.

If I disable it, I see the default placeholder page which is served from somewhere else. In all cases, I get the bind() to 0.0.0.0:80 failed error when I call passenger start --port 80. If I delete the pass.mydomain.com site in the Plesk interface, then I also destroy all the directories that were created for it.

How can I tell Plesk that I want this subdomain to exist, but I want to control it myself, without any "help"? Or alternatively, how do I get Plesk to help me to switch off whatever is already listening on port 80?

Thanks in advance for any enlightenment you can share,

James
 
Back
Top