12 Replies Latest reply on Jul 26, 2011 5:28 AM by Ron K

    JBoss AS6 failover - SFSB Error

    Ron K Newbie

      Hello all,

       

      I read in the forum that in JBoss AS 5 an error existed, that caused problems on failover with stateful session beans.

      My problem seems to be the same, I have a client that does a look up to a sfsb. The login here works perfect, but when I try to kill the leading node (the first node that started the cluster) to simulate a failover situation, i get this error:

       

      [CODE]JMX CONNECTION WITH NODE: 127.0.0.1:1190

      Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:

          java.net.ConnectException: Connection refused: connect]

      javax.ejb.NoSuchEJBException: Could not find stateful bean: 5c4o206n-oa143p-gocqh0ck-1-gocqmfly-dj

          at org.jboss.ejb3.cache.infinispan.InfinispanStatefulCache.get(InfinispanStatefulCache.java:402)

          at org.jboss.ejb3.stateful.StatefulInstanceAssociationInterceptor.invoke(StatefulInstanceAssociationInterceptor.java:50)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)....[/CODE]

       

      However, if I kill one of the other nodes the application keeps on running. My lookup:

       

      [CODE]

      Properties env = new Properties();
      env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");

      env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");

       

      String bindAddress = System.getProperty("jboss.bind.address",addressConnectionString);

      env.put(Context.PROVIDER_URL, bindAddress);

       

      try {
      ctx = new InitialContext(env);
      bean = (Counter) ctx.lookup("ejb/MGBean");
      return true;

      [/CODE]

       

      Any idea? Thanks in advance,

       

      Greets,