Tomcat startup error java.net. BindException: Permission denied: 80. tomcat startup Error

Source: Internet
Author: User

Tomcat startup error java.net. BindException: Permission denied: 80. tomcat startup Error

When Tomcat is started, the following error is reported:

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.20.acthttp11jsseprotocol. init (AbstractHttp11JsseProtocol. java: 119)
At org. apache. catalina. connector. Connector. initInternal (Connector. java: 978)
... 13 more
Cause: in linux, only the root user can access the port number below 1024, and other users cannot access the port number.


Solution 1:

Use sudo./startup. sh or the root user to start Tomcat.

Solution 2:

Modify the Tomcat server. xml configuration file,

Change the port number to 8081 (or another port number above 1024, but it cannot conflict with other ports on the local machine ),

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 accessing port 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.