3 Replies Latest reply on Jun 12, 2010 3:07 AM by timfox

    Client Not Initiating Failover in Active-Backup Configuration

    aengineer

      We are using 2.1.0.CR1. I have a HQ active-backup configuration, with active instance on server R1 and the backup instance on server R2.
      We have a "backup-connector-ref" element in the active servers (R1) hornetq-configuration.xml, and the referenced connector has its host set to server R2.

       

      When we kill the active hornetQ instance (R1) and there is atleast one JMS client connected, then failover occurs. If there are no clients connected to the active hornetQ server (R1), then no failover occurs.

       

      Based on past postings I would have expected that as soon as a client connects to the backup instance, failover should be initiated. If I perform the following sequence of events:
      - start active on R1
      - start backup on R1
      - kill -9 on active instance
      - try connecting JMS client, using JNDI provider URL (a) jnp://R1:1099, or (b) jnp://R1:1099,R2:1099 or (c) jnp://R2:1099

       

      and all three fail with the exception:

       

      2010-06-11 16:11:23,624 ERROR (QueueSend.java:103) - An exception occurred: ConnectionFactory not bound
      javax.naming.NameNotFoundException: ConnectionFactory not bound
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
          at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
          at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
          at sun.rmi.transport.Transport$1.run(Transport.java:159)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
          at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
          at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
          at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
          at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at com.putnam.jboss.queue.QueueSend.init(QueueSend.java:38)
          at com.putnam.jboss.queue.QueueSend.run(QueueSend.java:97)
          at com.putnam.jboss.queue.QueueSend.main(QueueSend.java:90)

       


      Is this expected or am I doing something wrong?

       

      Thanks
      Aspi Engineer
      Putnam Investments