1. 程式人生 > >centos tomcat啟動報錯

centos tomcat啟動報錯

錯誤資訊:

03-Oct-2018 11:02:30.518 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:112)     at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)     at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)     at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)     at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)     at org.apache.catalina.startup.Catalina.load(Catalina.java:632)     at org.apache.catalina.startup.Catalina.load(Catalina.java:655)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed     at org.apache.catalina.connector.Connector.initInternal(Connector.java:995)     at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)     ... 12 more Caused by: java.net.BindException: Address already in use     at sun.nio.ch.Net.bind0(Native Method)     at sun.nio.ch.Net.bind(Net.java:433)     at sun.nio.ch.Net.bind(Net.java:425)     at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)     at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:219)     at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1087)     at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:265)     at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581)     at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:68)     at org.apache.catalina.connector.Connector.initInternal(Connector.java:993)     ... 13 more

解決辦法:

netstat -anp 

檢視埠被佔用情況

ps -ef|grep PID 

檢視程序詳細情況

kill pid 

殺掉程序

重啟tomcat