7 Replies Latest reply on Aug 9, 2012 3:03 PM by William Porter

    HornetQ 2.3.0 Alpha replication

    Ameem Shaik Newbie

      Hi,

       

      I'm attempting to configure replication and failover in HornetQ 2.3.0 Alpha using static connectors. I'm able to start the live server, but when I attempt to start the backup server, it hangs for some time, and then I receive the following error:

       

      ERROR: HQ114002: Failure in initialisation

      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)

      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)

      Aug 8, 2012 10:08:12 AM org.hornetq.integration.bootstrap.HornetQBootstrapServer shutDown

      INFO: HQ101002: Stopping HornetQ Server

       

       

      In my live server's hornetq-configuration.xml, I have:

       

      <configuration xmlns="urn:hornetq"

                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                     xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

       

       

         <bindings-directory>${data.dir:../../data}/bindings</bindings-directory>

       

       

         <journal-directory>${data.dir:../../data}/journal</journal-directory>

       

         <large-messages-directory>${data.dir:../../data}/large-messages</large-messages-directory>

       

        <connectors>

            <connector name="netty-backup">

              <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

              <param key="host"  value="${hornetq.remoting.netty.host: myBackupHost}"/>

              <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </connector>

        </connectors>

        <acceptors>

            <acceptor name="netty">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

               <param key="host"  value="${hornetq.remoting.netty.host:0.0.0.0}"/>

               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </acceptor>

        </acceptors>

       

       

        <security-settings>

            <security-setting match="#">

               <permission type="createNonDurableQueue" roles="guest"/>

               <permission type="deleteNonDurableQueue" roles="guest"/>

               <permission type="createDurableQueue" roles="guest"/>

               <permission type="deleteDurableQueue" roles="guest"/>

               <permission type="consume" roles="guest"/>

               <permission type="send" roles="guest"/>

            </security-setting>

        </security-settings>

       

       

        <shared-store>false</shared-store>

        <clustered>true</clustered>

        <allow-failback>true</allow-failback>


        <cluster-connections>

              <cluster-connection name="my-cluster">

                      <address>jms</address>

                      <connector-ref>netty-backup</connector-ref>

                      <static-connectors allow-direct-connections-only="true">

                         <connector-ref>netty-backup</connector-ref>

                      </static-connectors>

              </cluster-connection>

        </cluster-connections>

       

      </configuration>

       

       

      My backup server's configuration is:

       

      <configuration xmlns="urn:hornetq"

                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                     xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

       

       

        <backup>true</backup>

        <shared-store>false</shared-store>

        <live-connector-ref connector-name = "netty-live"/>

        <clustered>true</clustered>

        <connectors>

            <connector name = "netty-live">

              <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

              <param key="host"  value="${hornetq.remoting.netty.host:myLiveHost}"/>

              <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </connector>

         </connectors>

       

       

         <acceptors>

            <acceptor name="netty">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

               <param key="host"  value="${hornetq.remoting.netty.host:0.0.0.0}"/>

               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </acceptor>

         </acceptors>

       

       

         <cluster-connections>

              <cluster-connection name="my-cluster">

                      <address>jms</address>

                      <connector-ref>netty-live</connector-ref>

                      <retry-interval>500</retry-interval>

                      <reconnect-attempts>-1</reconnect-attempts>

                      <static-connectors allow-direct-connections-only="true">

                              <connector-ref>netty-live</connector-ref>

                      </static-connectors>

              </cluster-connection>

         </cluster-connections>

       

       

         <paging-directory>${data.dir:../../data1}/paging</paging-directory>

         <bindings-directory>${data.dir:../../data1}/bindings</bindings-directory>

         <journal-directory>${data.dir:../../data1}/journal</journal-directory>

         <large-messages-directory>${data.dir:../../data1}/large-messages</large-messages-directory>

       

         <security-settings>

            <security-setting match="#">

               <permission type="createNonDurableQueue" roles="guest"/>

               <permission type="deleteNonDurableQueue" roles="guest"/>

                <permission type="createDurableQueue" roles="guest"/>

                <permission type="deleteDurableQueue" roles="guest"/>

                <permission type="consume" roles="guest"/>

               <permission type="send" roles="guest"/>

            </security-setting>

         </security-settings>

      </configuration>

       

      Can anybody pinpoint what's going wrong here?