In HHQ 4.5.2, it auto-discovered ActiveMQ 5.3 and pulls up the basic statistics about it. It fails, however, to pick up any of the services: brokers, connectors, queues, or topics.
After much pain, I figured out how to add JMX support to the container, which is running under Windows 2008R2. Every document I've read says to modify the startup script, but the version that was installed on my server uses the Java Service Wrapper. I had to modify wrapper.conf with additional parameters to the JVM. The arguments are the same (e.g. -Dcom.sun.management.jmxremote...), but it is pretty painful if you don't know where you're going.
Anyways, I have JMX responding and tested on a port of my choosing with authentication all set up and working just like I do for Tomcat. HHQ 4.5.2 talks to Tomcat and auto-discovers its internal workings just fine.
Not so for ActiveMQ. The agent running on the host that discovered ActiveMQ 5.3 in the first place, reports:
Unexpected error running autodiscoverer for plugin: ActiveMQ 5.3: jmx.url==null
...(MxServerDetector.java:4777)
The configuration parameters for ActiveMQ do not allow me to specify a JMX URI, so how is it supposed to do any inspections? I dug through the source code (fisheye.springsource.org/browse) and saw that the plugin seems to be nothing more than the MxServerDetector.
I'm stuck. Can anyone help me decode the auto-discovery process for ActiveMQ so that I can figure out what isn't configured properly? What assumptions are made? Where is the code that actually find the brokers, connectors, etc?
For the record, we installed the stand-alone ActiveMQ 5.3.0 package for Windows 32-bit. It used the Java Service Wrapper (Tanuki Software). Tomcat 6.0 is also on the machine, but there is no sharing of resources between the two containers.
If you've even read this and think you might have some idea, drop a reply that says you read this. Thanks!
I'm seeing the same jmx.url==null error when I try to discover all of our queues, here's the log:
2012-10-07 18:36:32,091 INFO [Thread-1] [RuntimeAutodiscoverer] Running runtime autodiscovery for ActiveMQ 5.6
2012-10-07 18:36:32,103 DEBUG [Thread-1] [MxServerDetector] [discoverServices] serverConfig=platform.id=10110,platform.log_track.level=Warn,server.log_track.include=,platform.log_track.enable=true,server.log_track.enable=false,server.config_track.enable=false,installpath=/opt/activemq,server.log_track.level=Error,server.log_track.files=var/activemq.log,platform.ip=10.100.71.108,platform.name=prd.queue01.ec2.xtify.com,server.config_track.files=,platform.config_track.enable=true,server.log_track.exclude=,platform.fqdn=prd.queue01.ec2.xtify.com,platform.type=Linux,process.query=State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq,
2012-10-07 18:36:32,103 ERROR [Thread-1] [RuntimeAutodiscoverer] Unexpected error running autodiscoverer for plugin: ActiveMQ 5.6: jmx.url==null
org.hyperic.hq.product.PluginException: jmx.url==null
at org.hyperic.hq.product.jmx.MxServerDetector.discoverServices(MxServerDetector.java:477)
at org.hyperic.hq.product.ServerDetector.discoverResources(ServerDetector.java:219)
at org.hyperic.hq.autoinventory.agent.server.RuntimeAutodiscoverer.doRuntimeScan_internal(RuntimeAutodiscoverer.java:272)
at org.hyperic.hq.autoinventory.agent.server.RuntimeAutodiscoverer.doRuntimeScan(RuntimeAutodiscoverer.java:205)
at org.hyperic.hq.autoinventory.ScanManager.mainRunLoop(ScanManager.java:165)
at org.hyperic.hq.autoinventory.ScanManager.access$000(ScanManager.java:41)
at org.hyperic.hq.autoinventory.ScanManager$1.run(ScanManager.java:107)
Caused by: java.net.MalformedURLException: jmx.url==null
at org.hyperic.hq.product.jmx.MxUtil.getMBeanConnector(MxUtil.java:435)
at org.hyperic.hq.product.jmx.MxServerDetector.discoverServices(MxServerDetector.java:474)
... 6 more
HOWEVER, when I run the discover manually, it discovers our queues:
Server: prd.queue01.ec2.xtify.com ActiveMQ 5.6 [/opt/apache-activemq-5.6.0]
AIID...../opt/apache-activemq-5.6.0
config...
product..process.query=State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq,jmx.url=ptql:State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq,
metric...
control..null
DEBUG [main] [PluginDiscoverer] Runtime discover for prd.queue01.ec2.xtify.com ActiveMQ 5.6, config=plugins.include=activemq,process.query=State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq,jmx.url=ptql:State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq,log=debug,installpath=/opt/apache-activemq-5.6.0,
DEBUG [main] [ProductPluginManager] No ProductPlugin found for: ActiveMQ 5.6
DEBUG [main] [MxServerDetector] [discoverServices] serverConfig=platform.log_track.level=Warn,platform.type=Linux,plugins.include=activemq,platform.ip=127.0.0.1,platform.name=localhost,platform.log_track.enable=true,process.query=State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq,platform.config_track.enable=true,jmx.url=ptql:State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq,log=debug,platform.fqdn=prd.queue01.ec2.xtify.com,installpath=/opt/apache-activemq-5.6.0,
DEBUG [main] [MxUtil] ptql:State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq resolved to vmid=6950, jmx.url=service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc4AAtVbmljYXN0UmVmMgAADTEwLjEwMC43MS4xMDgAAIa7bK5YhktP1QkkRaVXAAABOjx0bn6AAQB4
DEBUG [main] [MxServerDetector] [discoverMxServices] url=ptql:State.Name.sw=java,Args.*.eq=-Dactivemq.home=/opt/activemq
DEBUG [main] [MxServerDetector] [discoverMxServices] objName=null
DEBUG [main] [MxServerQuery] [findServices] servicePlugins={ActiveMQ 5.6 Topic=null, ActiveMQ 5.6 Broker=null, ActiveMQ 5.6 Queue=null, ActiveMQ 5.6 Connector=null}
DEBUG [main] [MxServerQuery] [findServices] name=org.apache.activemq:Type=Topic,*
DEBUG [main] [MxServerQuery] [findServices] services=(20)[org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Producer.Queue.CHRONICLE, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.SCHEDULER.ACTION, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PM.TIMING, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.OUT.LOCATION, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.STATS.INACTIVE, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PUSH.BULK, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PUSH.IPHONE, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PUSH.ANDROID, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PUSH.GCM, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PUSH.C2DM, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.STATS.SDK_ACTION, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PUSH.BLACKBERRY, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PM.LOCATION, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Queue, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.STATS.CLIENT, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.NetworkBridge, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.PM.STATISTICS, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.CHRONICLE, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Connection, org.apache.activemq:BrokerName=prd.queue01,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.STATS.ACTION]
What am I missing here?
Ok, I was running hq agent as root. I changed it to run as activemq (the same user activemq is running as), and auto discovery found all of my queues. All working.