Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-9355

EJB cluster proxies are not failing over

XMLWordPrintable

    • Regression, Blocks Testing

      There is a cluster of two EAP servers called "node1" and "node2". There is a clustered EJB application deployed on both servers.

      I am using these jboss-ejb-client.properties

      remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
      remote.connections=node1
      invocation.timeout=120000
      
      remote.connection.node1.host=127.0.0.1
      remote.connection.node1.port=8080
      remote.connection.node1.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
      remote.connection.node1.channel.options.org.jboss.remoting3.RemotingOptions.MAX_OUTBOUND_MESSAGES=30000
      

      There are two issues blocking load-balancing and failover:
      1. wildfly-discovery-client needs to be updated to 1.0.0.Beta10 in order to fix WFDISC-17. With the current version 1.0.0.Beta9, the EJB client logs this NPE:

      javax.naming.CommunicationException: EJBCLIENT000062: Failed to look up "/server/HelloBean!ejb.HelloBeanRemote?stateful" [Root exception is java.lang.NullPointerException]
      	at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:139)
      	at org.wildfly.naming.client.AbstractContext.lookup(AbstractContext.java:88)
      	at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)
      	at javax.naming.InitialContext.lookup(InitialContext.java:417)
      	at org.jboss.as.standaloneejbclient.Main.doSingleLookupSmarterStylePropertiesFromFileOnClasspath(Main.java:329)
      	at org.jboss.as.standaloneejbclient.Main.main(Main.java:34)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
      Caused by: java.lang.NullPointerException
      	at org.wildfly.discovery.ServiceURL.satisfies(ServiceURL.java:256)
      	at org.wildfly.discovery.impl.LocalRegistryAndDiscoveryProvider.discover(LocalRegistryAndDiscoveryProvider.java:74)
      	at org.wildfly.discovery.Discovery.discover(Discovery.java:94)
      	at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.discover(RemotingEJBDiscoveryProvider.java:74)
      	at org.wildfly.discovery.ConfiguredProvider.discover(ConfiguredProvider.java:45)
      	at org.wildfly.discovery.Discovery.discover(Discovery.java:94)
      	at org.jboss.ejb.client.EJBClientContext.discover(EJBClientContext.java:440)
      	at org.jboss.ejb.client.EJBClientContext.discoverAffinityNone(EJBClientContext.java:711)
      	at org.jboss.ejb.client.EJBClientContext.performLocatedAction(EJBClientContext.java:698)
      	at org.jboss.ejb.client.EJBClientContext.createSession(EJBClientContext.java:679)
      	at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:280)
      	at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:137)
      	... 10 more
      

      2. Using the default affinity, or setting affinity to one of these: Affinity.LOCAL, new ClusterAffinity("ejb") will prevent the client to successfully fail over to another node in the cluster.

      The only workaround for now is setting affinity to Affinity.NONE.

              rachmato@redhat.com Richard Achmatowicz
              mvinkler1@redhat.com Michal Vinkler
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: