12 Replies Latest reply on Jul 10, 2012 3:02 PM by Joshua Davis

    Error with Multiple Failover Failback Example

    jhannah Newbie

      I'm trying to run the Multiple Failover Failback example with HornetQ 2.2.5.  When I run the example on my WinXP system with the build.bat script, the example fails with the following output:

       

           [java] Got exception while acknowledging message: Timed out waiting for response when sending packet 43
           [java] Oct 3, 2011 10:02:40 AM org.hornetq.core.logging.impl.JULLogDelegate warn
           [java] WARNING: Failed to connect to server.
           [java] java.lang.NullPointerException
           [java]  at org.hornetq.jms.example.MultipleFailoverFailbackExample.runExample(MultipleFailoverFailbackExample.java:111)
           [java]  at org.hornetq.common.example.HornetQExample.run(HornetQExample.java:76)
           [java]  at org.hornetq.jms.example.MultipleFailoverFailbackExample.main(MultipleFailoverFailbackExample.java:33)
           [java]
           [java] #####################
           [java] ###    FAILURE!   ###
           [java] #####################

       

      Has anyone else experience this?  Could anyone share a solution to this problem?  There is no readme.html with this example, so I'm not aware of any

       

      specific setup that has to be done prior to running the example.  If anyone has any detail, please share.

       

      I've included the entire output of the exampel below if this is helpful to anyone.

       

      Thanks,

       

      J

       

      ---------------------

       

      Build script found javac.
      hit alternate
      Using the following ant version from ..\..\..\tools\ant:
      calling ..\..\..\tools\ant\bin\ant.bat -version
      Apache Ant version 1.7.1 compiled on June 27 2008
      calling ..\..\..\tools\ant\bin\ant.bat  -Dhornetq.run_script=true
      Buildfile: build.xml

      clean:
         [delete] Deleting directory C:\hornetq-2.2.5.Final\examples\jms\multiple-failover-failback\build
         [delete] Deleting directory C:\hornetq-2.2.5.Final\examples\jms\multiple-failover-failback\server0\data

      delete-files:
         [delete] Deleting: C:\hornetq-2.2.5.Final\examples\jms\multiple-failover-failback\server0\KILL_ME

      run:

      init:
          [mkdir] Created dir: C:\hornetq-2.2.5.Final\examples\jms\multiple-failover-failback\build
          [mkdir] Created dir: C:\hornetq-2.2.5.Final\examples\jms\multiple-failover-failback\build\classes

      compile:
           [echo] src.example.dir=C:\hornetq-2.2.5.Final\examples\jms\multiple-failover-failback\src
          [javac] Compiling 6 source files to C:\hornetq-2.2.5.Final\examples\jms\multiple-failover-failback\build\classes

      runExample:
           [java] serverProps = -XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=C:\hornetq-2.2.5.Final\examples\common/config/logging.properties -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
           [java] Oct 3, 2011 10:01:48 AM org.hornetq.common.example.HornetQExample run
           [java] INFO: hornetq.example.runServer is true
           [java] Oct 3, 2011 10:01:48 AM org.hornetq.common.example.HornetQExample startServer
           [java] INFO: starting server with config 'server0' logServerOutput true
           [java] HornetQServer_0 err:[main] 10:01:49,365 WARNING [org.hornetq.core.deployers.impl.FileConfigurationParser]  AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
           [java] HornetQServer_0 err:[main] 10:01:49,459 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/largemessages,pagingDirectory=data/paging)
           [java] HornetQServer_0 err:[main] 10:01:49,459 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  Waiting to obtain live lock
           [java] HornetQServer_0 err:[main] 10:01:49,490 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Using NIO Journal
           [java] HornetQServer_0 err:[main] 10:01:49,506 WARNING [org.hornetq.core.server.impl.HornetQServerImpl]  Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.
           [java] HornetQServer_0 err:[main] 10:01:49,600 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  Waiting to obtain live lock
           [java] HornetQServer_0 err:[main] 10:01:49,600 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  Live Server Obtained live lock
           [java] HornetQServer_0 err:[main] 10:01:55,177 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  trying to deploy queue jms.queue.exampleQueue
           [java] HornetQServer_0 err:[main] 10:01:55,412 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor]  Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5445 for CORE protocol
           [java] HornetQServer_0 err:[main] 10:01:55,427 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  Server is now live
           [java] HornetQServer_0 err:[main] 10:01:55,427 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  HornetQ Server version 2.2.5.Final (HQ_2_2_5_FINAL_AS7, 121) [db48270b-edbf-11e0-8586-002186a03d83] started
           [java] HornetQServer_0 out:STARTED::
           [java] Oct 3, 2011 10:01:55 AM org.hornetq.common.example.HornetQExample startServer
           [java] INFO: starting server with config 'server1' logServerOutput true
           [java] HornetQServer_1 err:[main] 10:01:56,818 WARNING [org.hornetq.core.deployers.impl.FileConfigurationParser]  AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
           [java] HornetQServer_1 err:[main] 10:01:56,880 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  backup server is starting with configuration HornetQ Configuration (clustered=true,backup=true,sharedStore=true,journalDirectory=../server0/data/journal,bindingsDirectory=../server0/data/bindings,largeMessagesDirectory=../server0/data/large-messages,pagingDirectory=../server0/data/paging)
           [java] HornetQServer_1 out:STARTED::
           [java] Oct 3, 2011 10:01:56 AM org.hornetq.common.example.HornetQExample startServer
           [java] INFO: starting server with config 'server2' logServerOutput true
           [java] HornetQServer_1 err:[Thread-2] 10:01:56,880 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  Waiting to become backup node
           [java] HornetQServer_1 err:[Thread-2] 10:01:56,880 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  ** got backup lock
           [java] HornetQServer_1 err:[Thread-2] 10:01:56,912 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Using NIO Journal
           [java] HornetQServer_1 err:[Thread-2] 10:01:56,927 WARNING [org.hornetq.core.server.impl.HornetQServerImpl]  Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.
           [java] HornetQServer_1 err:[Thread-2] 10:01:58,083 INFO [org.hornetq.core.server.cluster.impl.ClusterManagerImpl]  announcing backup
           [java] HornetQServer_1 err:[Thread-2] 10:01:58,099 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  HornetQ Backup Server version 2.2.5.Final (HQ_2_2_5_FINAL_AS7, 121) [db48270b-edbf-11e0-8586-002186a03d83] started, waiting live to fail before it gets active
           [java] HornetQServer_2 err:[main] 10:01:58,849 WARNING [org.hornetq.core.deployers.impl.FileConfigurationParser]  AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
           [java] HornetQServer_2 err:[main] 10:01:58,911 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  backup server is starting with configuration HornetQ Configuration (clustered=true,backup=true,sharedStore=true,journalDirectory=../server0/data/journal,bindingsDirectory=../server0/data/bindings,largeMessagesDirectory=../server0/data/large-messages,pagingDirectory=../server0/data/paging)
           [java] HornetQServer_2 err:[Thread-2] 10:01:58,911 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  Waiting to become backup node
           [java] HornetQServer_2 out:STARTED::
           [java] Oct 3, 2011 10:01:58 AM org.hornetq.common.example.HornetQExample getContext
           [java] INFO: using server0\client-jndi.properties for jndi
           [java] Sent message: This is text message 0
           [java] Sent message: This is text message 1
           [java] Sent message: This is text message 2
           [java] Sent message: This is text message 3
           [java] Sent message: This is text message 4
           [java] Sent message: This is text message 5
           [java] Sent message: This is text message 6
           [java] Sent message: This is text message 7
           [java] Sent message: This is text message 8
           [java] Sent message: This is text message 9
           [java] Sent message: This is text message 10
           [java] Sent message: This is text message 11
           [java] Sent message: This is text message 12
           [java] Sent message: This is text message 13
           [java] Sent message: This is text message 14
           [java] Sent message: This is text message 15
           [java] Sent message: This is text message 16
           [java] Sent message: This is text message 17
           [java] Sent message: This is text message 18
           [java] Sent message: This is text message 19
           [java] Sent message: This is text message 20
           [java] Sent message: This is text message 21
           [java] Sent message: This is text message 22
           [java] Sent message: This is text message 23
           [java] Sent message: This is text message 24
           [java] Sent message: This is text message 25
           [java] Sent message: This is text message 26
           [java] Sent message: This is text message 27
           [java] Sent message: This is text message 28
           [java] Sent message: This is text message 29
           [java] Got message: This is text message 0
           [java] Got message: This is text message 1
           [java] Got message: This is text message 2
           [java] Got message: This is text message 3
           [java] Got message: This is text message 4
           [java] Got message: This is text message 5
           [java] Got message: This is text message 6
           [java] Got message: This is text message 7
           [java] Got message: This is text message 8
           [java] Got message: This is text message 9
           [java] Got message: This is text message 10
           [java] Got message: This is text message 11
           [java] Got message: This is text message 12
           [java] Got message: This is text message 13
           [java] Got message: This is text message 14
           [java] Got message: This is text message 15
           [java] Got message: This is text message 16
           [java] Got message: This is text message 17
           [java] Got message: This is text message 18
           [java] Got message: This is text message 19
           [java] Got message: This is text message 20
           [java] Got message: This is text message 21
           [java] Got message: This is text message 22
           [java] Got message: This is text message 23
           [java] Got message: This is text message 24
           [java] Got message: This is text message 25
           [java] Got message: This is text message 26
           [java] Got message: This is text message 27
           [java] Got message: This is text message 28
           [java] Got message: This is text message 29
           [java] Killing server 0
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,458 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=5 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=6 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=7 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=8 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=9 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=10 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=11 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=12 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=13 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,474 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Deleting unreferenced message id=14 from the journal
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,599 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  trying to deploy queue jms.queue.exampleQueue
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,677 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor]  Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5446 for CORE protocol
           [java] HornetQServer_1 err:[Thread-0 (group:HornetQ-server-threads14327460-4254944)] 10:02:03,677 WARNING [org.hornetq.core.server.cluster.impl.ClusterManagerImpl]  Unable to announce backup
           [java] HornetQServer_1 err:HornetQException[errorCode=3 message=Timed out waiting to receive initial broadcast from cluster]
           [java] HornetQServer_1 err: at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:569)
           [java] HornetQServer_1 err: at org.hornetq.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:503)
           [java] HornetQServer_1 err: at org.hornetq.core.server.cluster.impl.ClusterManagerImpl$1.run(ClusterManagerImpl.java:860)
           [java] HornetQServer_1 err: at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
           [java] HornetQServer_1 err: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           [java] HornetQServer_1 err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           [java] HornetQServer_1 err: at java.lang.Thread.run(Thread.java:662)
           [java] HornetQServer_1 err:[Thread-2] 10:02:03,708 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  Backup Server is now live
           [java] HornetQServer_2 err:[Thread-2] 10:02:03,911 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  ** got backup lock
           [java] HornetQServer_2 err:[Thread-2] 10:02:03,927 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Using NIO Journal
           [java] HornetQServer_2 err:[Thread-2] 10:02:03,942 WARNING [org.hornetq.core.server.impl.HornetQServerImpl]  Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.
           [java] HornetQServer_2 err:[Thread-2] 10:02:04,052 INFO [org.hornetq.core.server.cluster.impl.ClusterManagerImpl]  announcing backup
           [java] HornetQServer_2 err:[Thread-2] 10:02:04,052 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  HornetQ Backup Server version 2.2.5.Final (HQ_2_2_5_FINAL_AS7, 121) [db48270b-edbf-11e0-8586-002186a03d83] started, waiting live to fail before it gets active
           [java] HornetQServer_2 err:[Thread-0 (group:HornetQ-server-threads14327460-4254944)] 10:02:14,082 WARNING [org.hornetq.core.server.cluster.impl.ClusterManagerImpl]  Unable to announce backup
           [java] HornetQServer_2 err:HornetQException[errorCode=3 message=Timed out waiting to receive initial broadcast from cluster]
           [java] HornetQServer_2 err: at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:569)
           [java] HornetQServer_2 err: at org.hornetq.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:503)
           [java] HornetQServer_2 err: at org.hornetq.core.server.cluster.impl.ClusterManagerImpl$1.run(ClusterManagerImpl.java:860)
           [java] HornetQServer_2 err: at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
           [java] HornetQServer_2 err: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           [java] HornetQServer_2 err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           [java] HornetQServer_2 err: at java.lang.Thread.run(Thread.java:662)
           [java] Got exception while acknowledging message: Timed out waiting for response when sending packet 43
           [java] Oct 3, 2011 10:02:40 AM org.hornetq.core.logging.impl.JULLogDelegate warn
           [java] WARNING: Failed to connect to server.
           [java] java.lang.NullPointerException
           [java]  at org.hornetq.jms.example.MultipleFailoverFailbackExample.runExample(MultipleFailoverFailbackExample.java:111)
           [java]  at org.hornetq.common.example.HornetQExample.run(HornetQExample.java:76)
           [java]  at org.hornetq.jms.example.MultipleFailoverFailbackExample.main(MultipleFailoverFailbackExample.java:33)
           [java]
           [java] #####################
           [java] ###    FAILURE!   ###
           [java] #####################
      Done