Tomcat cannot bind port 80 under Linux

Time:2020-10-18

There is a strange problem today:

Tomcat cannot bind port 80.

I changed itconf/server.xmlFile, which will be the default8080Change to80, and then restart. Since my Tomcat is installed by myself, it is notapt-getandyum, so you can work in this way. Not yet.

At first, I thought that the port was occupied, so I unloaded MySQL and restarted tomcat, but it still didn’t work.

And then I remembernetstat -anCheck the port usage and find that Tomcat is started, but port 80 is not.

As a result, stack overflow and Google seem to be very unstable today. They are always 522, and they are probably DDoS…

Try authbind [CentOS needs to download the RPM package from Yum and install it, but it doesn’t work in the source].

One particularly important thing was discovered later:

Under Linux, root permission is required to bind ports below 1024!

Meow egg, use sudo to start Tomcat. After that, the binding is successful and the website can be visited normally.

Recommended Today

Construction of Vue development environment and project creation under mac

start First of all, let’s take a look at the overall development environment of Vue. Homebrew: package manager under MAC system, similar to apt get under Linux, windows control panel – install and remove program Node.jsJavaScript runtime, which is similar to simultaneous interpretation in international conferences, can’t run various programming languages directly between different systems […]