8 Replies Latest reply on Dec 23, 2017 10:59 PM by Fred Ling

    Cluster EJB problem with "-b 0.0.0.0"

    Fred Ling Newbie

      I have two Wildfly 9.0 nodes, which start with --server-config=standalone-full-ha.xml -b 0.0.0.0

      And a clustered stateless session bean are deployed to these nodes.

       

      A standalone client uses following properties to make the ejb call. Only the info of the first node has been provided.

      {

      org.jboss.ejb.client.scoped.context=true

      java.naming.factory.url.pkgs=org.jboss.ejb.client.naming

      invocation.timeout=300000

       

      remote.connections=10_101_7_124_8080

      remote.connections.connect.eager=false

       

      remote.connection.10_101_7_124_8080.host=10.101.7.124

      remote.connection.10_101_7_124_8080.port=8080

      remote.connection.10_101_7_124_8080.username=testuser

      remote.connection.10_101_7_124_8080.password=testpwd

      remote.connection.10_101_7_124_8080.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

      remote.connection.10_101_7_124_8080.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER

      remote.connection.10_101_7_124_8080.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false

       

      remote.clusters=ejb

      remote.cluster.ejb.username=testuser

      remote.cluster.ejb.password=testpwd

      remote.cluster.ejb.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER

      remote.cluster.ejb.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false

      }

       

      The problem is that it fails to call the second node, because it tries to connect to 0.0.0.0.

       

      Dec 20, 2017 12:49:20 PM org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager getEJBReceiver

      INFO: Could not create a connection for cluster node ClusterNode{clusterName='ejb', nodeName='ds1', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='0.0.0.0', destinationPort=8080}], resolvedDestination=[Destination address=0.0.0.0, destination port=8080]} in cluster ejb

      java.lang.RuntimeException: java.net.ConnectException: Connection refused: no further information

      at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:92)

      at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:80)

      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:469)

      at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:443)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

      Caused by: java.net.ConnectException: Connection refused: no further information

      at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

      at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)

      at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:319)

      at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)

      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:78)

      ... 8 more

       

      I'm doing a product migration from Jboss4.2 to Wildfly 9, seems the clustered ejb works with -b 0.0.0.0 in 4.2.

      Does anyone know if these is a behavior change or I have missed some configuration? Thanks!