1. ホーム
  2. java

[解決済み] java.net.SocketException: 認識できないWindowsソケットエラー: 0: JVM_Bind (JBOSS)

2022-02-16 15:12:07

質問


JBoss 4.0.5 GAをWindows 7でJavaバージョン1.5で使用しています(レガシーシステムで作業しているため、古いJavaバージョンとJBossを使用しなければなりません)。 そしてサーバーを起動すると、次のエラーが表示されます。

java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind  

そして、これが他の多くの例外を引き起こしているのだと思います。

11:09:26,925 WARN  [ServiceController] Problem starting servicejboss.cache:service=TomcatClustering Cache
java.lang.NullPointerException
    at org.jgroups.protocols.FD_SOCK.down(FD_SOCK.java:235)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.FD.down(FD.java:278)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.stack.Protocol.down(Protocol.java:540)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.pbcast.NAKACK.down(NAKACK.java:297)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.UNICAST.down(UNICAST.java:262)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.pbcast.STABLE.down(STABLE.java:292)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.pbcast.GMS.down(GMS.java:605)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.FC.down(FC.java:122)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.FRAG2.down(FRAG2.java:146)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.Protocol.passDown(Protocol.java:510)
    at org.jgroups.protocols.pbcast.STATE_TRANSFER.down(STATE_TRANSFER.java:217)
    at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:467)
    at org.jgroups.stack.ProtocolStack.down(ProtocolStack.java:331)
    at org.jgroups.JChannel.down(JChannel.java:1035)
    at org.jgroups.JChannel.connect(JChannel.java:374)
    at org.jboss.cache.TreeCache.startService(TreeCache.java:1424)
    at org.jboss.cache.aop.PojoCache.startService(PojoCache.java:94)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy8.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
    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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
    at org.jboss.Main.boot(Main.java:200)
    at org.jboss.Main$1.run(Main.java:490)
    at java.lang.Thread.run(Thread.java:619)  

どなたか助けていただけると大変助かります。少なくとも、私が解決策を探すべき場所を把握するために(例えば、これはWindows 7とJBossクラスタリングの非互換性に関連するエラーでしょうか?これは間違ったポートの設定のためですか? など)

ありがとうございます。

解決方法は?

この問題は、IPv6 TCP Stackがインストールされている一部のWindowsシステムで発生します。コンピュータにIPv4とIPv6の両方がインストールされている場合、Java仮想マシン(JVM)がオペレーティングシステムレベルでソケットを閉じたり開いたりする際に問題が発生することがあります。

以下のJVMオプションを追加します。 -Djava.net.preferIPv4Stack=true

この現象は、IPv4とIPv6の両方のスタックがデフォルトでインストールされているWindows 7とWindows 2008のシステムで確認されています。