【tomcat】java.lang.Exception: Socket bind failed: [730013] ???????????????í????×??????·??????×?
阿新 • • 發佈:2018-10-31
【問題描述】
今天啟動tomcat的時候發生瞭如下的報錯:
java.lang.Exception: Socket bind failed: [730013] ???????????????í????×??????·??????×? at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:470) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:650) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:452) at org.apache.catalina.connector.Connector.initInternal(Connector.java:978) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:560) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:838) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:642) at org.apache.catalina.startup.Catalina.load(Catalina.java:667) 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.load(Bootstrap.java:253) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427) 十月 17, 2018 8:15:35 上午 org.apache.catalina.core.StandardService initInternal 嚴重: Failed to initialize connector [Connector[HTTP/1.1-8080]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8080]] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:560) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:838) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:642) at org.apache.catalina.startup.Catalina.load(Catalina.java:667) 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.load(Bootstrap.java:253) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427) Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:980) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ... 12 more Caused by: java.lang.Exception: Socket bind failed: [730013] ???????????????í????×??????·??????×? at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:470) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:650) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:452) at org.apache.catalina.connector.Connector.initInternal(Connector.java:978) ... 13 more
【問題原因】
這是因為tomcat的埠號被佔用所導致的。
【解決辦法】
更換tomcat的埠號。找到tomcat的conf資料夾下的server.xml檔案,更換埠號,如下圖所示: