經過Eclipse啓動tomcat報錯:Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s),按照網上的解決辦法改端口也沒有用(經過netstat -ano根本就沒有發現端口被佔用)。html
查看logs裏的日誌發現啓動報錯了:java
java.net.SocketException: Unrecognized Windows Sockets error: 10106: create at java.net.ServerSocket.createImpl(ServerSocket.java:308) at java.net.ServerSocket.getImpl(ServerSocket.java:257) 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:440) at org.apache.catalina.startup.Catalina.await(Catalina.java:769) at org.apache.catalina.startup.Catalina.start(Catalina.java:715) 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:601) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
打開cmd,輸入:netsh winsock reset 而後回車apache
winsock是Windows網絡編程接口,winsock工做在應用層,它提供與底層傳輸協議無關的高層數據傳輸編程接口 netsh winsock reset 是把它恢復到默認狀態