4 Replies Latest reply on Sep 26, 2012 2:47 AM by ataylor

    HornetQ replication fails, getting timeouts

    javahamburg

      I'm trying to get the new HornetQ 2.3.0.alpha replication running, on two different hosts. When I try it on my local machine it does work more or less (separated hornetq with different ports). I will explain it in more detail shortly.

      I use the plain vanilla HornetQ 2.3.0.alpha on latest 64bit Xubuntu (local tests) and CentOs (distributed), Oracle JDK 6u33 (but also tried other versions).

       

      Now when testing localy, I use a different port for the backup (5446). I start the live, then the backup server. The backup syncs with the live. I kill/stop the live. The backup will continue to work instead, and requests against the backup work (which now operates on 5445). Now I want to start the live again, which does not work, since the backup uses the 5445. Therefore my next test was to start the live/backup on separate machines.

       

      On separated hosts, the live-server starts as expected. When I start the backup, it hangs when he copies some data directores. After that he gets a timeout. There is not firewall or anything else between them, I already checked that twice and with my local admin. Telnet'ing from the backup-host to the live-host works fine.

       

      Here is the exception I get on the backup, I append my configuration below:

       

      ***********************************************************************************
      java  -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Dhornetq.config.dir=../config/stand-alone/non-clustered -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=../config/stand-alone/non-clustered/logging.properties -Djava.library.path=. -classpath ../lib/netty.jar:../lib/jnpserver.jar:../lib/jnp-client.jar:../lib/jboss-mc.jar:../lib/jboss-jms-api.jar:../lib/hornetq-twitter-integration.jar:../lib/hornetq-spring-integration.jar:../lib/hornetq-service-sar.jar:../lib/hornetq-rest.jar:../lib/hornetq-journal.jar:../lib/hornetq-jms.jar:../lib/hornetq-jms-client.jar:../lib/hornetq-jboss-as-integration.jar:../lib/hornetq-core.jar:../lib/hornetq-core-client.jar:../lib/hornetq-commons.jar:../lib/hornetq-bootstrap.jar:../config/stand-alone/non-clustered:../schemas/ org.hornetq.integration.bootstrap.HornetQBootstrapServer hornetq-beans.xml
      ***********************************************************************************
      Unable to read the logging configuration from '../config/stand-alone/non-clustered/logging.properties' (java.net.MalformedURLException: no protocol: ../config/stand-alone/non-clustered/logging.properties)
      11:50:37,611 INFO  [org.hornetq.integration.bootstrap] HQ101001: Starting HornetQ Server
      11:50:38,932 INFO  [org.hornetq.core.server] HQ111001: backup server is starting with configuration HornetQ Configuration (clustered=true,backup=true,sharedStore=false,journalDirectory=../data/journal,bindingsDirectory=../data/bindings,largeMessagesDirectory=../data/large-messages,pagingDirectory=../data/paging)
      11:50:38,950 WARN  [org.hornetq.core.server] HQ112216: Moving data directory ../data/bindings to ../data/bindings22
      11:50:38,952 WARN  [org.hornetq.core.server] HQ112216: Moving data directory ../data/journal to ../data/journal22
      11:50:38,953 WARN  [org.hornetq.core.server] HQ112216: Moving data directory ../data/paging to ../data/paging22
      11:50:38,953 WARN  [org.hornetq.core.server] HQ112216: Moving data directory ../data/large-messages to ../data/large-messages22
      11:51:39,106 ERROR [org.hornetq.core.server] HQ114002: Failure in initialisation: java.lang.RuntimeException: Could not estabilish the connection
          at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingBackupActivation.run(HornetQServerImpl.java:2152) [hornetq-core.jar:]
          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]

      java.lang.RuntimeException: Could not estabilish the connection
          at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingBackupActivation.run(HornetQServerImpl.java:2152)
          at java.lang.Thread.run(Thread.java:662)

       

       

      I used the default configuration files as base (config/stand-alone/non-clustered), and attached the hornetq-configuration.xml and hornetq-jms.xml for live and backup.

       

      When I created the sandbox locally, it uses the same configuration, except that for backup the hornetq-beans.xml is changed to move the ports from 1099/1098 to 1199/1198.

      I'm working on this now for days, and tried already various combinations, so please excuse me If I missed something. Thanks a lot!