java 7套接字监听异常
我在 jboss 初始化期间遇到 java 7 套接字侦听异常。
JAVA: c:\Program Files\Java\jdk1.7.0\\bin\java
17:14:15,388 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
17:14:15,405 ERROR [AbstractKernelController] Error installing to Start: name=jboss:service=WebService state=Create mode=Manual requiredState=Installed
java.net.SocketException: Permission denied: listen failed
当我将 JAVA_HOME 设置为 c:\Program Files\Java\jdk1.6.0.26
时,jboss 初始化期间没有异常。
I have java 7 socket listen exception during jboss initialization.
JAVA: c:\Program Files\Java\jdk1.7.0\\bin\java
17:14:15,388 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
17:14:15,405 ERROR [AbstractKernelController] Error installing to Start: name=jboss:service=WebService state=Create mode=Manual requiredState=Installed
java.net.SocketException: Permission denied: listen failed
When I set JAVA_HOME to c:\Program Files\Java\jdk1.6.0.26
there are no exceptions during jboss initialization.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的猜测是,这是 Windows 防火墙 - 它对 JDK 6 二进制文件有例外(即权限),但对 JDK 7 二进制文件没有例外。我建议您打开 Windows 防火墙配置小程序,检查其中的内容(通过端口或二进制)并给予 JDK 7 相同的权限。
编辑:我建议你把 JBoss 排除在外:编写一个小应用程序,它只是尝试监听 127.0.0.1 上的端口 8083。尝试在 JDK6 和 JDK7 上运行它。如果这在开箱即用的情况下工作,那么请尝试确切改变指定侦听端口的方式。
My guess is that this is Windows firewall - that it's got an exception (i.e. a permission) for the JDK 6 binary, but not for the JDK 7 binary. I suggest you open up the Windows firewall configuration applet, check what's there (either by port or binary) and give JDK 7 the same permission.
EDIT: I suggest you get JBoss out of the equation: write a small app which simply tries to listen on port 8083 on 127.0.0.1. Try running that on both JDK6 and JDK7. If that works in both out of the box, then try varying exactly how you specify the listening port.