简体   繁体   English

java.lang.RuntimeException:端口8686对内部rmi注册表不可用

[英]java.lang.RuntimeException: Port 8686 is not available for the internal rmi registry

While deploying an ear on glassfish i am getting this error. 在将耳放到玻璃鱼上时,出现此错误。 Does anyone know how to fix this issue 有谁知道如何解决这个问题

[#|2015-08-04T05:10:40.077+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=83;_ThreadName=Thread-2;|java.lang.RuntimeException: Port 8686 is not available for the internal rmi registry. This means that a call was made with the same port, without closing earlier registry instance. This has to do with the system jmx connector configuration in admin-service element of the configuration associated with this instance
    at org.glassfish.admin.mbeanserver.RMIConnectorStarter._startRegistry(RMIConnectorStarter.java:240)
    at org.glassfish.admin.mbeanserver.RMIConnectorStarter.startRegistry(RMIConnectorStarter.java:217)
    at org.glassfish.admin.mbeanserver.RMIConnectorStarter.<init>(RMIConnectorStarter.java:152)
    at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.startConnector(JMXStartupService.java:278)
    at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.run(JMXStartupService.java:322)
|#]

I made sure that none of the process is using port 8686 using netstat command still i am getting the same issue. 我确保所有进程都没有使用netstat命令使用端口8686,但仍然遇到相同的问题。

try this 尝试这个

1) netstat -a -o -n and it will bring up a network list,search for the local address like 127.0.0.1:8686 and note the PID (eq 3624). 1) netstat -a -o -n它将弹出一个网络列表,搜索本地地址,例如127.0.0.1:8686并记下PID(eq 3624)。

2) taskkill /F /PID 3624 . 2) taskkill /F /PID 3624 Run this command to kill that process. 运行此命令以终止该进程。

This appears to be a known bug in Glassfish, qv here . 这似乎是在Glassfish的一个已知的bug,QV 这里 Could you try upgrading to Glassfish 4.x ? 您可以尝试升级到Glassfish 4.x吗? The bug is reported as being fixed, but I'm not sure which version 3.x has the fix in it. 该错误被报告为已修复,但我不确定哪个3.x版本具有此修复程序。 You should be fine with Glassfish 4.x so long as you have JDK 7 and above. 只要您拥有JDK 7及更高4.x就可以使用Glassfish 4.x

With regards to the cause of this bug, here is an excerpt from the link I cited above: 关于此错误的原因,以下是我上面引用的链接的摘录:

I did some investigation and found that our startup code calls LocateRegistry.createRegistry(), but shutdown code never unexports the registry, so subsequent createRegistry fails. 我进行了一些调查,发现我们的启动代码调用LocateRegistry.createRegistry(),但是关闭代码从不取消导出注册表,因此后续的createRegistry失败。 Look at the discussion 1 to understand what needs to be done. 查看讨论1以了解需要做什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM