Artur Owczarek
Artur Owczarek

Reputation: 1167

ActiveMQ can't be bound to 0.0.0.0 in Wildfly 10.0.0.CR2 in profile standalone-full-ha

When I download fresh copy of Wildfly 10 RC2, and I try to run it using

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

i receive an exception.

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"}}

I can run the same Wildfly in full and ha modes without any problem. What do I do wrong and how to get rid of this exception?

Upvotes: 1

Views: 2058

Answers (1)

Dariusz Szumacher
Dariusz Szumacher

Reputation: 41

The address 0.0.0.0 does not pass JGroups validation. It should be recognized as all interfaces, but the JGroups treats it as regular IP address. Such interface does not exist in OS. As a workaround you need to set explicitly the network interface for jgroups in standalone-full-ha.xml. Next reference in for jgroups settings. E.g.

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

and

 <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>

Upvotes: 4

Related Questions