6-Jul-2020 14:49:00.898 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8065"] 06-Jul-2020 14:49:00.913 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 1277 ms 06-Jul-2020 14:49:00.915 严重 [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8005]: java.net.BindException: 地址已在使用 at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376) at java.net.ServerSocket.bind(ServerSocket.java:376) at java.net.ServerSocket.<init>(ServerSocket.java:237) at org.apache.catalina.core.StandardServer.await(StandardServer.java:421) at org.apache.catalina.startup.Catalina.await(Catalina.java:776) at org.apache.catalina.startup.Catalina.start(Catalina.java:722) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474) 06-Jul-2020 14:49:00.916 信息 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8065"] 06-Jul-2020 14:49:00.925 信息 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"] 06-Jul-2020 14:49:00.926 信息 [main] org.apache.catalina.core.StandardService.stopInternal 正在停止服务[Catalina] 06-Jul-2020 14:49:00.982 信息 [main] org.apache.coyote.AbstractProtocol.stop 正在停止ProtocolHandler ["http-nio-8065"]
解决办法:网上查询后说是端口号有占用 ,netstat -alnp | grep 8604 查询但是我查询完后么有问题,
最后我的解决办法是修改tomcat conf/service.xml 3个端口
因为我的服务器上布置了多个tomcat,如果只修改8080,其他两个不修改也会冲突导致报错
对应在 service.xml中是这个三个标签
1. <Server port="8005" shutdown="SHUTDOWN">
2. <Connector port="8065" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
3. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
就像eclipse启动多个tomcat修改端口一样