0 Replies Latest reply on Sep 16, 2003 2:20 PM by Merv Newell

    Failover - must be missing something

    Merv Newell Newbie


      Ok I guess I am missing something when it comes to clustering. I'm attempting to do a proof of concept test with clustering JBoss and have not been able to successfully get this to work, currently only attempting to get failover working.

      First of all I am running 3.2.2RC2 and have 2 machines setup and running, a Windows 2000 Advanced server and a Windows NT workstation. A small test environment. I have started JBoss on both machines and clustering appears to be up and running.
      I judge this by the messages output by JBoss on machine 1 when the second machine comes up:

      12:44:20,496 INFO [DefaultPartition] New cluster view (id: 13, delta: 1) : [,]
      12:44:20,506 INFO [DefaultPartition:ReplicantManager] Dead members: 0

      I build and deploy my Stateless Session bean on both machines.

      The jboss.xml file is:
      <?xml version="1.0" encoding="UTF-8"?>




      I have a simple stand alone app that I run to call the EJB. The jndi properties file for the app is:

      I start the app and call the ejb and I get this message in the jboss console of the first machine:
      12:47:55,555 INFO [STDOUT] Someone called `calculateCompoundInterest!'

      Indicating that the EJB call worked. I then shutdown that version of jboss and the second machine's
      console displays this message:
      12:52:27,231 INFO [DefaultPartition] New cluster view (id: 14, delta: -1) : []
      12:52:27,251 INFO [DefaultPartition:ReplicantManager] Dead members: 1

      Once again indicating to me that the clustering is working.

      I then have the application call the EJB again.
      And I get this message:
      java.rmi.ConnectException: Connection refused to host:; nested exception is:
      java.net.ConnectException: Connection refused: connect

      My assumption was that the call would failover to the second jboss server, but obivously doesn't. If I stop the client app and
      start it back up the client app connects and makes the call to the EJB successfully.

      Ok I must not be understanding something. Can somebody explain what I am doing wrong here. I've read the jboss
      clustering doc and have spent a lot of time going through the forums but don't seem to get what I am doing wrong.

      My understanding was that if I set the custered tag to true in jboss.xml and point to HAJNDI port that the failover
      happens automatically and that no special code is needed.

      Thanks for any help