在profile standalone-full-ha中,ActiveMQ不能绑定到Wildfly 10.0.0.CR2中的0.0.0.0

时间:2015-10-15 06:31:34

标签: wildfly

当我下载Wildfly 10 RC2的新副本时,我尝试使用

运行它

bin/standalone.sh -c=standalone-full-ha.xml -b=0.0.0.0

我收到一个例外。

08:21:12,870 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.messaging-activemq.default: org.jboss.msc.service.StartException in service jboss.messaging-activemq.default: WFLYMSGAMQ0033: Failed to start service
at org.wildfly.extension.messaging.activemq.ActiveMQServerService.start(ActiveMQServerService.java:307)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.security.PrivilegedActionException: java.net.BindException: [UDP] /0.0.0.0 is not a valid address on any local network interface
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
at org.jboss.as.clustering.jgroups.JChannelFactory.createChannel(JChannelFactory.java:99)
at org.wildfly.extension.messaging.activemq.ActiveMQServerService.start(ActiveMQServerService.java:247)
... 5 more
Caused by: java.net.BindException: [UDP] /0.0.0.0 is not a valid address on any local network interface
at org.jgroups.util.Util.checkIfValidAddress(Util.java:3522)
at org.jgroups.stack.Configurator.ensureValidBindAddresses(Configurator.java:903)
at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:118)
at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:57)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:477)
at org.jgroups.JChannel.init(JChannel.java:853)
at org.jgroups.JChannel.<init>(JChannel.java:159)
at org.jboss.as.clustering.jgroups.JChannelFactory$1.run(JChannelFactory.java:96)
at org.jboss.as.clustering.jgroups.JChannelFactory$1.run(JChannelFactory.java:93)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
... 7 more

08:21:12,875 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "messaging-activemq"),
("server" => "default")
]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.messaging-activemq.default" => "org.jboss.msc.service.StartException in service jboss.messaging-activemq.default: WFLYMSGAMQ0033: Failed to start service
Caused by: java.security.PrivilegedActionException: java.net.BindException: [UDP] /0.0.0.0 is not a valid address on any local network interface
Caused by: java.net.BindException: [UDP] /0.0.0.0 is not a valid address on any local network interface"}}

我可以完全和ha模式运行相同的Wildfly而没有任何问题。我做错了什么以及如何摆脱这种异常?

1 个答案:

答案 0 :(得分:4)

地址0.0.0.0未通过JGroups验证。它应该被识别为所有接口,但JGroups将其视为常规IP地址。 OS中不存在这样的接口。作为您需要的解决方法 在standalone-full-ha.xml中明确设置jgroup的网络接口。 jgroups设置的下一个参考。 例如。

<interfaces>
   <interface name="jgroups-intf">
       <nic name="eth0"/>
   </interface>
</interfaces>

 <socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">
  ...
    <socket-binding name="jgroups-mping" interface="jgroups-intf" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
            <socket-binding name="jgroups-tcp" interface="jgroups-intf" port="7600"/>
            <socket-binding name="jgroups-tcp-fd" interface="jgroups-intf" port="57600"/>
            <socket-binding name="jgroups-udp" interface="jgroups-intf" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
            <socket-binding name="jgroups-udp-fd" interface="jgroups-intf" port="54200"/>
            <socket-binding name="jgroups-tcp-hq" interface="jgroups-intf" port="7660"/>
            <socket-binding name="jgroups-tcp-hq-fd" interface="jgroups-intf" port="7670"/>
            <socket-binding name="modcluster" interface="jgroups-intf" port="0" multicast-address="224.0.1.188" multicast-port="23364"/>
    </socket-binding-group>