error message:
Error initializing endpoint
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at ...

solve methods:

a:更改服务器的端口号
打开...tomcat/conf/server.xml,找到
 
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/> ,修改port端口;
 

b:关闭占用当前端口的进程

1.查看端口是否被占用

cmd输入: netstat -ano

eg:我的服务器的端口是8080,被PID为2508的进程占用:      

tomcat:java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind_端口

2.查看该PID为 2508 的进程

使用命令:tasklist|findstr "2508"
tomcat:java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind_端口_02

可以看出 PID为2508的进程是 TNSLSNR.exe
3. 关掉占用此端口的进程
a)使用命令:taskkill
tomcat:java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind_端口_03

或者b)直接通过任务管理器关掉进程

windows任务管理器-->进程-->查看-->选择列-->勾选PID-->确定-->点PID列按PID排序-->关掉2508, (一般会是JAVAW进程) 重新启动;