我正在使用tomcat8,并且将cofg / server.xml中的http端口更改为
在http连接器中,我已将端口8080更改为80
< Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
我已经重新启动了tomcat,但是出现了这个错误
apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1 11 Sep 2018]
18-Jun-2019 18:20:46.933 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
18-Jun-2019 18:20:46.961 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-80]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-80]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:113)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:996)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
... 12 more
Caused by: java.net.SocketException: Permission denied
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:461)
请任何人帮助我如何在端口80上启动tomcat8。更改server.xml中的端口后,我遇到了erroe
答案 0 :(得分:0)
端口80是特权端口。您有几种选择:
第二个和第三个在内核中表现出[略微]更好的性能,但是您只会在真正繁忙的服务器中看到任何形式的延迟或吞吐量增加