Tomcat Start Error java.net.BindException:Permission denied:80

Source: Internet
Author: User

When Tomcat starts, it reports the following error:

caused By:java.net.BindException:Permission denied <null>:80

At Org.apache.tomcat.util.net.JIoEndpoint.bind (jioendpoint.java:410)
At Org.apache.tomcat.util.net.AbstractEndpoint.init (abstractendpoint.java:640)
At Org.apache.coyote.AbstractProtocol.init (abstractprotocol.java:434)
At Org.apache.coyote.http11.AbstractHttp11JsseProtocol.init (abstracthttp11jsseprotocol.java:119)
At Org.apache.catalina.connector.Connector.initInternal (connector.java:978)
... More
Cause : Only the root user can access the port number below 1024 on the Linux system and the rest of the user cannot access it.


Workaround 1:

When you start Tomcat, use sudo./startup.sh or start with the root user

Workaround 2:

Modify Tomcat's server.xml configuration file,

Modify the port to 8081 (or the other port number above 1024, but not to the other ports on this computer),

Then use the root user to log on to the server and execute the Port redirection command:

Iptables-t nat-a prerouting-p tcp--dport 80-j REDIRECT--to-port 8081

(Redirect to port 8081 when you access port 80).

Tomcat Start Error java.net.BindException:Permission denied:80

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.