3 Replies Latest reply on Feb 13, 2014 7:00 AM by veenaonnet

    Not able to find JMS queue with JNDI on failback in collocated topology - hornetq jboss 7.2

    veenaonnet Newbie


      Hi,

       

      Use case is

      Using collocated topology for HA with clustered setup.

      Using in-vm connection factory to access queues using JNDI.

       

      1. Start server A

      2. Start server B

      3. Stop server A

      failover occurs - I can access queues on server B using JNDI names.

      4. Start server A

      failback occurs - I cannot access queues on server B using JNDI names

      Even admin console doesn't show it under JNDI but it can be seen in jms-destinations.

       

      Log I am getting on server B

      2014-02-06 04:51:37,992 INFO  [org.jboss.as.messaging] (Thread-672) JBAS011605: Unbound messaging object to jndi name java:/queue/RestoreJobs

      2014-02-06 04:51:37,990 WARN  [org.hornetq.core.server] (Thread-29 (HornetQ-client-global-threads-2125519725)) HQ222095: Connection failed with failedOver=false: HornetQDisconnectedException[errorType=DISCONNECTED message=HQ119015: The connection was disconnected because of server shutdown]

              at org.hornetq.core.client.impl.ClientSessionFactoryImpl$CloseRunnable.run(ClientSessionFactoryImpl.java:1634) [hornetq-core-client-2.4.0-SNAPSHOT.jar:]

              at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:107) [hornetq-core-client-2.4.0-SNAPSHOT.jar:]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

              at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      2014-02-06 04:51:38,060 WARN  [org.hornetq.core.server] (Thread-672) HQ222015: LIVE IS STOPPING?!? message=FAIL_OVER enabled=true

      2014-02-06 04:51:38,060 WARN  [org.hornetq.core.server] (Thread-672) HQ222015: LIVE IS STOPPING?!? message=FAIL_OVER true

      2014-02-06 04:51:38,151 INFO  [org.hornetq.core.server] (Thread-672) HQ221002: HornetQ Server version 2.4.0.SNAPSHOT (Andromedian Fly, 123) [202a6901-8f2c-11e3-9ae3-bdc6faddc134] stopped

      2014-02-06 04:51:38,152 INFO  [org.hornetq.core.server] (Thread-672) HQ221039: Restarting as Replicating backup server after live restart

      2014-02-06 04:51:38,152 INFO  [org.hornetq.core.server] (Thread-672) HQ221000: backup server is starting with configuration HornetQ Configuration (clustered=true,backup=true,shared

       

      Let me know if I am missing any configuration.

      Will this issue be solved if I use RemoteConnectionFactory?

       

      Regards,

      Veena

        • 1. Re: Not able to find JMS queue with JNDI on failback in collocated topology - hornetq jboss 7.2
          Justin Bertram Master

          Try using the latest Wildfly.  I believe some issues with failback were resolved since AS 7.2.

          • 2. Re: Not able to find JMS queue with JNDI on failback in collocated topology - hornetq jboss 7.2
            Miroslav Novak Master

            Hi Veena,

             

            "in-vm connection factory" you can use only in applications which are in the same JVM as AS/Wildfly server ((usually in MDBs, EJBs and Servlets) so when you kill/shutdown the server you actually kill your application and in such case it can't failover. I hope I don't miss something here. Can you describe what you're trying to achieve.

             

            Yes, RemoteConnectionFactory will help if your application is in another JVM. For example if you have standalone JMS client the configuration for its connection factory should look like (it's default in full-ha profile):

                              <connection-factory name="RemoteConnectionFactory">
                                    <connectors>
                                        <connector-ref connector-name="netty"/>
                                    </connectors>
                                    <entries>
                                        <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
                                    </entries>
                                    <ha>true</ha>
                                    <block-on-acknowledge>true</block-on-acknowledge>
                                    <retry-interval>1000</retry-interval>
                                    <retry-interval-multiplier>1.0</retry-interval-multiplier>
                                    <reconnect-attempts>-1</reconnect-attempts>
                                </connection-factory>
            
            • 3. Re: Not able to find JMS queue with JNDI on failback in collocated topology - hornetq jboss 7.2
              veenaonnet Newbie

              Hi,

               

              I have setup collocated toplogy with messaging replication.

              All queues are durable. I am using in-vm connectionfactory as due to replication messages will be replicated and will be in the same jvm.

               

              I solved this issue. Actually, previously, I configured JMS queues for Default as well as backup server which was causing them to get unbound when backup server stopped.

              Now, I am still using in-vm connectionfactory but have configured queues only with the default server.

              This configuration is working perfect.

               

              Thanks for your reply.

               

              Regards,

              Veena