[wildfly-dev] bind the server against all interfaces "-b 0.0.0.0" or configuration <any-address/>

Wolf-Dieter Fink wfink at redhat.com
Tue Dec 16 11:20:18 EST 2014


To use EJB invocations from localhost and remote with IP
I try to bind the server instances against all interfaces with -b 
0.0.0.0 or changing the public-interface configuration to <any-address/>.

The client connect the real IP.
I use the ejb-remote quickstart to reproduce.

If I use the standalone.xml profile it works fine.
But change to -ha.xml will fail.

Do I need to use a different configuration to being able to use all 
interfaces?
 From my point of view this is a bug as I can't configure the server for 
all interfaces!



The ejb-remote server side is changed, the jboss-ejb3.xml mark the beans 
as Clustered!
If the server starts - with 0.0.0.0 or any-address - JGroups will not 
start correct:

17:14:19,522 ERROR [org.jboss.msc.service.fail] (MSC service thread 
1-13) MSC000001: Failed to start service jboss.jgroups.channel.ee: 
org.jboss.msc.service.StartException in service 
jboss.jgroups.channel.ee: java.security.PrivilegedActionException: 
java.net.BindException: [UDP] /0.0.0.0 is not a valid address on any 
local network interface
     at 
org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:93)
     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:1145)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     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:638)
     at 
org.jboss.as.clustering.jgroups.JChannelFactory.createChannel(JChannelFactory.java:87)
     at 
org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:90)
     ... 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:3458)
     at 
org.jgroups.stack.Configurator.ensureValidBindAddresses(Configurator.java:902)
     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:848)
     at org.jgroups.JChannel.<init>(JChannel.java:159)
     at 
org.jboss.as.clustering.jgroups.JChannelFactory$1.run(JChannelFactory.java:84)
     at 
org.jboss.as.clustering.jgroups.JChannelFactory$1.run(JChannelFactory.java:81)
     at 
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:634)
     ... 7 more


================================

If the server start with "-b MY-IP" and the default standalone-ha.xml, 
it works with the following message
and the cluster-connections seems not correct established


INFO: Could not create a connection for cluster node 
ClusterNode{clusterName='ejb', nodeName='redhat', 
clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, 
sourceNetworkMaskBits=0, destinationAddress='${jboss.node.name}', 
destinationPort=8080}], resolvedDestination=[Destination 
address=${jboss.node.name}, destination port=8080]} in cluster ejb
java.lang.RuntimeException: java.io.IOException: 
java.net.URISyntaxException: Illegal character in authority at index 7: 
http://@${jboss.node.name}:8080/?#
     at 
org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:92)
     at 
org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:77)
     at 
org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
     at 
org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:79)
     at 
org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:405)
     at 
org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:379)
     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.net.URISyntaxException: Illegal 
character in authority at index 7: http://@${jboss.node.name}:8080/?#
     at 
org.jboss.remoting3.remote.HttpUpgradeConnectionProvider.createConnection(HttpUpgradeConnectionProvider.java:102)
     at 
org.jboss.remoting3.remote.RemoteConnectionProvider.connect(RemoteConnectionProvider.java:215)
     at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:298)
     at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:388)
     at 
org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:153)
     at 
org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:133)
     at 
org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:75)
     at 
org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
     at 
org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:79)
     at 
org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:405)
     at 
org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:379)
     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     at java.lang.Thread.run(Thread.java:745)
     at ...asynchronous invocation...(Unknown Source)
     at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)
     at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:388)
     at 
org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:153)
     at 
org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:133)
     at 
org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:75)
     ... 8 more
Caused by: java.net.URISyntaxException: Illegal character in authority 
at index 7: http://@${jboss.node.name}:8080/?#
     at java.net.URI$Parser.fail(URI.java:2829)
     at java.net.URI$Parser.parseAuthority(URI.java:3167)
     at java.net.URI$Parser.parseHierarchical(URI.java:3078)
     at java.net.URI$Parser.parse(URI.java:3034)
     at java.net.URI.<init>(URI.java:680)
     at 
org.jboss.remoting3.remote.HttpUpgradeConnectionProvider.createConnection(HttpUpgradeConnectionProvider.java:100)
     at 
org.jboss.remoting3.remote.RemoteConnectionProvider.connect(RemoteConnectionProvider.java:215)
     at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:298)
     ... 12 more



More information about the wildfly-dev mailing list