1 Reply Latest reply on Oct 13, 2008 7:16 PM by grafzal

    Failover failed

    grafzal

      Hello,

      I am using JBoss 4.3.0.GA_CP01. I purchased the JBoss Developer Studio and so I got no support contract. I have set up a cluster with 2 Servers and a client which is connected to one of these (Topic with clustered=true and ClusteredConnectionFactory). When I shut down the server to which the client is conected failover is not working and I get the following exception on the client:

      [java] ERROR 13-10 18:01:46,553 (FailoverCommandCenter.java:failureDetected:186) -Failover failed
      [java] javax.jms.JMSException: Cannot find a cached connection factory delegate for node -1
      [java] at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:217)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
      [java] at org.jboss.jms.client.FailoverCommandCenter.failureDetected(FailoverCommandCenter.java:129)
      [java] at org.jboss.jms.client.container.ConnectionFailureListener.handleConnectionException(ConnectionFailureListener.java:62)
      [java] at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:81)
      [java] at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:561)
      [java] ERROR 13-10 18:01:46,563 (ConnectionFailureListener.java:handleConnectionException:66) -Caught exception in handling failure
      [java] javax.jms.JMSException: Cannot find a cached connection factory delegate for node -1
      [java] at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:217)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
      [java] at org.jboss.jms.client.FailoverCommandCenter.failureDetected(FailoverCommandCenter.java:129)
      [java] at org.jboss.jms.client.container.ConnectionFailureListener.handleConnectionException(ConnectionFailureListener.java:62)
      [java] at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:81)
      [java] at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:561)
      [java] ERROR 13-10 18:01:47,853 (FailoverCommandCenter.java:failureDetected:186) -Failover failed
      [java] javax.jms.JMSException: Cannot find a cached connection factory delegate for node -1
      [java] at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:217)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
      [java] at org.jboss.jms.client.FailoverCommandCenter.failureDetected(FailoverCommandCenter.java:129)
      [java] at org.jboss.jms.client.container.ConnectionFailureListener.handleConnectionException(ConnectionFailureListener.java:62)
      [java] at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:81)
      [java] at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:561)
      [java] ERROR 13-10 18:01:47,858 (ConnectionFailureListener.java:handleConnectionException:66) -Caught exception in handling failure
      [java] javax.jms.JMSException: Cannot find a cached connection factory delegate for node -1
      [java] at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:217)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
      [java] at org.jboss.jms.client.FailoverCommandCenter.failureDetected(FailoverCommandCenter.java:129)
      [java] at org.jboss.jms.client.container.ConnectionFailureListener.handleConnectionException(ConnectionFailureListener.java:62)
      [java] at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:81)
      [java] at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:561)

      Thanks for your help...

        • 1. Re: Failover failed
          grafzal

          Shame on me...

          I have found the answer to this problem in the first question of the FAQ:
          https://www.jboss.org/community/docs/DOC-9239

          To achieve failover during a normal shutdown of the server there is an option
          in the PostOffice Configuration:

          xxx-persistence-service.xml:

          .
          .
          .
          <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
          
          <attribute name="FailoverOnNodeLeave">true</attribute>
          .
          .
          .


          Of cause you will have to use at least messaging-1.4.0.sp3.cp02 which
          is available in SVN and already included in the EAP Bundle.

          svn co https://anonsvn.jboss.org/repos/messaging/tags/JBossMessaging_1_4_0_SP3_CP02 messaging-1.4.0.sp3.cp02

          Very nice!

          so long...