早晨改好了工程,部署完,启动tomcat期待结果,谁知还没启动完就开始报了一大堆错误,如下:
SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:649)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:766)
at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
at org.apache.catalina.connector.Connector.start(Connector.java:1122)
at org.apache.catalina.core.StandardService.start(StandardService.java:540)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
一月 06, 2014 9:01:31 上午 org.apache.catalina.core.StandardService start
SEVERE: Failed to start connector [Connector[HTTP/1.1-8080]]
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??
凡是碰见错误一定要找准根本的原因,否则会废老鼻子劲了。那就开始找吧,刚开始看到那么多问号以为是乱码,后来看看源码中都是正常的汉字,应该不是,后边还有一个X,这好像是内存或是物理地址或者路径的事,再仔细看,上边有一句重点的SEVERE: Failed to start connector [Connector[HTTP/1.1-8080]],很明显是端口的事,连接8080端口失败,网上查找资料,检测8080端口状态,命令如下:
发现8080端口被PID为4088的的进程占用,ctrl+alt+del打开任务管理器,选择进程,找到PID为4088的进程:
刚想起来,早晨音悦台提示安装了一个插件,没有关闭,果断把google Chrome中的扩展关掉,不管事,后来又用360小助手直接把yinyueplus.exe终止了(也可以在任务管理器中关闭进程),再次启动tomcat工程,ok!成功!