6 Replies Latest reply on Apr 8, 2015 3:53 PM by Justin Bertram

    Why do i get "trying to deploy queue" messages over and over?

    ga smith Newbie

      I fire up a hornetq instance, and i keep getting messages like:

       

           [java] 2015-03-25 15:07:03,068 INFO  org.hornetq.core.server.impl.HornetQServerImpl:1185 [pool-2-thread-1] [deployQueue] HQ221003: trying to deploy queue jms.queue.my_queue

       

      Over and over, once every 5s per queue. I also notice that if i connect jconsole to the hornetq server, and examine the entries under Queue => JMS, these entries keep appearing and disappearing, ie, it seems like the jmx beans keep getting recreated over and over.

       

      Now in terms of behavior, the server behaves fine. Ie, i don't find anything wrong with expected behavior. Publishing/Consuming from the queues in question is fine.

        • 1. Re: Why do i get "trying to deploy queue" messages over and over?
          Justin Bertram Master

          I fire up a hornetq instance, and i keep getting messages like:

           

               [java] 2015-03-25 15:07:03,068 INFO  org.hornetq.core.server.impl.HornetQServerImpl:1185 [pool-2-thread-1] [deployQueue] HQ221003: trying to deploy queue jms.queue.my_queue

           

          Over and over, once every 5s per queue.

          I'm not sure why you're seeing this logging over and over.  Can you attach the full log where you see this along with your configuration and an explanation of your use-case?

          • 2. Re: Why do i get "trying to deploy queue" messages over and over?
            ga smith Newbie

            Ok, so the first thing to note is that i'm not starting a server using the out-of-the-box scripts. I'm starting the server using java code, via the hornet API:

             

            FileConfiguration config = new FileConfiguration();

            config.setConfigurationUrl("hornetq-configuration.xml");

            config.setSecurityEnabled(false);

            config.setPersistenceEnabled(false);

            config.start();

            HornetQServer server = HornetQServers.newHornetQServer(config);

            serverManager = new JMSServerManagerImpl(server, "hornetq-jms.xml");

            serverManager.setContext(null);

            serverManager.start();

             

            If i start the server using the scripts, then i do NOT see the repeated "trying to deploy" messages.

             

            In the java case, the "trying to deploy" messages start right away, below are the first few lines of the log:

             

                 [java] 2015-03-26 15:01:11,496 WARN  org.hornetq.core.deployers.impl.FileConfigurationParser:514 [main] [parseMainConfig] HQ222018: AIO was not 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] 2015-03-26 15:01:11,569 INFO  org.hornetq.core.server.impl.HornetQServerImpl:411 [main] [start] HQ221000: live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=../data/journal,bindingsDirectory=../data/bindings,largeMessagesDirectory=../data/large-messages,pagingDirectory=../data/paging)

                 [java] 2015-03-26 15:01:11,581 WARN  org.hornetq.core.server.impl.HornetQServerImpl:1514 [main] [initialisePart1] HQ222007: Security risk! HornetQ is running with the default cluster admin user and default password. Please see the HornetQ user guide, cluster chapter, for instructions on how to change this.

                 [java] 2015-03-26 15:01:11,595 INFO  org.hornetq.core.remoting.server.impl.RemotingServiceImpl:155 [main] [<init>] HQ221043: Adding protocol support CORE

                 [java] 2015-03-26 15:01:11,600 INFO  org.hornetq.core.remoting.server.impl.RemotingServiceImpl:169 [main] [<init>] HQ221043: Adding protocol support STOMP

                 [java] 2015-03-26 15:01:11,690 INFO  org.hornetq.core.server.impl.HornetQServerImpl:1185 [main] [deployQueue] HQ221003: trying to deploy queue jms.queue.my_queue

             

            The other thing i noticed with the java startup, is that a <queues> entry in hornetq-configuration.xml doesn't take; I have to add <queue> entries to the hornetq-jms.xml in order to see the queues. In contrast, with the out-of-the-box scripts, a <queues> entry in hornetq-configuration.xml is picked up fine.

             

            This is with 2.4.0.Final btw.

            • 3. Re: Why do i get "trying to deploy queue" messages over and over?
              Justin Bertram Master

              Is your goal simply to start an embedded HornetQ JMS server?  If so, check out the "embedded-simple" example that's shipped with HornetQ.  It takes just 2 lines of code (assuming your configuration files are named using the defaults):

               

              EmbeddedJMS jmsServer = new EmbeddedJMS();
              jmsServer.start();
              
              • 4. Re: Why do i get "trying to deploy queue" messages over and over?
                ga smith Newbie

                That is essentially what i'm trying to do, fire up an embedded server. I'll look into this "EmbeddedJMS" class, see if that does the trick. Thanks.

                • 5. Re: Why do i get "trying to deploy queue" messages over and over?
                  ga smith Newbie

                  I really needed to specify the config file programmatically, and i found that the issue had to do with the classpath of the config file.

                   

                  If i specify a config file of "hornetq-jms.xml" (ie, at the root of the classpath), then i don't get the msgs. If i specify "/com/blah/hornetq-jms.xml", then i do.

                   

                  Debug logging shows constant messages like the below when "/com/blah/hornetq-jms.xml" is specified:

                   

                  hornet-main.log:DEBUG | 04-07-2015 20:45:54.014 | pool-2-thread-1 | org.hornetq.core.deployers.impl.FileDeploymentManager(247) | Undeploying org.hornetq.jms.server.impl.JMSServerDeployer@57f4bf33 with url file:/C:/git/project/target/classes/com/blah/hornetq-jms.xml

                   

                  If "hornetq-jms.xml" is used, then i don't see the "Undeploying" messages at all.

                   

                  But again, in both cases, everything seems to work fine behavior-wise. It's just the annoying messages that keep appearing over and over.

                  • 6. Re: Why do i get "trying to deploy queue" messages over and over?
                    Justin Bertram Master

                    So what code are you using at this point where you see the annoying messages?  Perhaps you could modify one of the embedded HornetQ examples to reproduce exactly what you're seeing so I could reproduce it locally.