14 Replies Latest reply on Mar 22, 2012 5:13 AM by mmuthu

    HornetQ Failover Issue

    mmuthu

      HI,

       

      As of now i'm using "HornetQ_2_2_8_EAP_GA" in my environment as a standalone server

       

      I'm able to do clustering configuration having node 1 and 2 with static connector. But i'm trying to test the fail over configuration but i'm not able to start either live or backup server not even once.

       

      What i understood is that we need following configiuration in hornetq-configuration.xml for live server,

       

      <backup-connector-ref connector-name="backup-connector"/>

       

      <connectors>

           <!-- This connector specifies how to connect to the backup server    -->

           <connector name="backup-connector">

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

             <param key="host" value="localhost"/>

             <param key="port" value="5445"/>

           </connector>

      </connectors>

       

      When i start the live server with this configuration, no matter what, the server always throwing me out with "SAXParser" exception as it is not able to recognize the "backup-connector-ref".

       

      On the other hand if i add the backup tag (<backup>true</backup>) in my backup server, the server is just hanging after the following message,

       

      * [main] 1-Feb 15:40:49,203 WARNING [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

      * [main] 1-Feb 15:40:49,297 INFO [HornetQServerImpl]  backup server is starting with configuration HornetQ Configuration (clustered=true,backup=true,sharedStore=false,journalDirectory=../data/journal,bindingsDirectory=../data/bindings,largeMessagesDirectory=../data/large-messages,pagingDir
      ectory=../data/paging)

       

      Do i miss anything basic?

       

      -- Muthu

       

        • 1. Re: HornetQ Failover Issue
          ataylor

          the configuration has changed and you no longer need a backup ref, i would take a look at some of the examples.

          • 2. Re: HornetQ Failover Issue
            mmuthu

            Hi,

             

            I don't i think i follow you. But I tried to run the "jms/transaction-failover" example. I guess the backup server is just hanging like it hangs for me.

             

            -- Muthu

            • 3. Re: HornetQ Failover Issue
              ataylor

              im saying you dont need backup-connector-ref in 2.2.8. regarding your hanging issue, you havent really given me much info, what do you mean by hanging?

              • 4. Re: HornetQ Failover Issue
                mmuthu

                Hi,

                 

                When i start the backup server the log is not moving after the following two output in the console,

                 

                * [main] 1-Feb 16:34:46,159 WARNING [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

                * [main] 1-Feb 16:34:46,221 INFO [HornetQServerImpl]  backup server is starting with configuration HornetQ Configuration (clustered=true,backup=true,sharedStore=false,journalDirectory=../data/journal,bindingsDirectory=../data/bindings,largeMessagesDirectory=../data/large-messages,pagingDir
                ectory=../data/paging)

                 

                It makes me to think that the server is hanging. I have attached my hornetq-configuration.xml for backup server. Pls. let me know what else you need

                 

                -- Muthu

                • 5. Re: HornetQ Failover Issue
                  ataylor

                  we only support shard store for backups in that version and you have shared-store set to false

                  • 6. Re: HornetQ Failover Issue
                    mmuthu

                    Hi, Ok. Is it a safe assumption that HornetQ is not supporting fail over with out shared store. Any plan to support this in future or already available in some branch, trunk, etc for me to try locally.

                     

                    -- Muthu

                    • 7. Re: HornetQ Failover Issue
                      ataylor

                      its should be available very soon, its currently in trunk but not quite finished

                      • 8. Re: HornetQ Failover Issue
                        stasikos

                        Sorry about bumping this thread, Andy, however I want to know in advance which release will include failover without shared store, and what is approximate planned month for this?

                        • 9. Re: HornetQ Failover Issue
                          ataylor

                          should be soon, we are close too completing now.

                          • 10. Re: HornetQ Failover Issue
                            mmuthu

                            Andy, Sorry to continue on this thread. But a possible date for the release will help. In the absence of the fail over, we are planning to implement "ExceptionListener" in the application and handle fail over in application. This would require lot of changes, testing everything from the start. So if you could let me know the date and if it is near, may be i can stop my application fail over implementation and wait for the release instead.

                             

                            -- Muthu

                            • 11. Re: HornetQ Failover Issue
                              ataylor

                              like i say it should be soon, maybe in the next month or so.

                               

                              re your plan to use an exception listener, you do know that this wont handle any replay of state or recreation of sessions etc you will have to this yourself, also you would have to use transactions or at least duplicate detection to avoid inconsistency

                              • 12. Re: HornetQ Failover Issue
                                mmuthu

                                Yes. I'm aware of the state loss while reconnecting from application. But do you think i have any other choice?

                                 

                                -- Muthu

                                • 13. Re: HornetQ Failover Issue
                                  ataylor

                                  no, i guess if you have time constraints you should go that route.

                                  • 14. Re: HornetQ Failover Issue
                                    mmuthu

                                    Andy, Anything to smile about hornetq fail over...? How close you are...?

                                     

                                    -- Muthu