当前位置:编程学习 > JAVA >>

Unrecognized Windows Sockets error: 0: JVM_Bind

012-11-16 11:38:48 org.apache.coyote.http11.Http11Protocol init
严重: 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 org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1049)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-11-16 11:38:48 org.apache.catalina.core.StandardService initialize
严重: Failed to initialize connector [Connector[HTTP/1.1-8080]]
LifecycleException:  Protocol handler initialization failed: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at org.apache.catalina.connector.Connector.initialize(Connector.java:1051)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-11-16 11:38:48 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 608 ms

 

 

 

java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
此异常的原因是服务器端口被占用 所以解决办法是:
一:更改服务器的端口号; www.zzzyk.com
二:关闭占用当前端口的进程
下边介绍第二种方法
1.首先进入命令行 查看端口是否被占用 
使用命令: netstat -ano
我的服务器的端口是443
此端口已被PID为3432的进程占用

2.查看该PID为 3432 的进程
使用命令:tasklist|findstr "3432"
由于在解决问题时,我把PID为3432的进程已关掉,所以演示时,我用2784来做

 
可以看出 PID为2784的进程是 ConnectifyService.exe
第一种解决办法是:把ConnectifyService.exe进程关掉
第二种解决办法是:直接通过任务管理器查看PID为3432的进程,然后关掉
windows任务管理器->查看->选择列  选中PID 然后查看任务管理器,关掉PID为3432的进程

 

补充:软件开发 , Java ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,