You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by jbelch <ja...@verizon.net> on 2013/08/01 02:48:26 UTC

JMX interface with Java Broker .20

I was reading the "Qpid JMX API for HA" section today at
http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-High-Availability-JMXAPI.html
and it looked like it would be fairly simple to get Berkeley DB state
infomration using the JMX Java API.  I can get information from other MBeans
in the JVM, but I can't seem to get anything from BDBHAMessageStore in code
and I can't see the BDBHAMessageStore element under the org.apache.qpid tree
in the JConsole.  Any ideas on what I am doing wrong?  Is there something I
have to enable in the configuration files before I startup the qpid server?



--
View this message in context: http://qpid.2158936.n2.nabble.com/JMX-interface-with-Java-Broker-20-tp7596278.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: JMX interface with Java Broker .20

Posted by jbelch <ja...@verizon.net>.
I was missing the jar. I can now see the bean in jconsole.  Thanks for the
quick response.



--
View this message in context: http://qpid.2158936.n2.nabble.com/JMX-interface-with-Java-Broker-20-tp7596278p7596329.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: JMX interface with Java Broker .20

Posted by Robbie Gemmell <ro...@gmail.com>.
The below looks reasonable, in which case another option would be that the
mbean provider isnt being discovered. Do you have the qpid-bdbstore-jmx jar
in your lib/plugins folder?

If so, can you outline the steps you used to set up and start the broker? I
downloaded the 0.20 release before replying earlier and tried this out
without incident, simply adding the BDB JE jar and configuring a vhost with
the HA store using the example from the 0.20 docs (sans typo), after which
starting the broker I found the MBean has been created.

Robbie

On 1 August 2013 16:11, jbelch <ja...@verizon.net> wrote:

> My active node's configuration looks like the following:
>
> <virtualhost>
>     <name>test</name>
>     <test>
>        <store>
>
> <class>org.apache.qpid.server.store.berkeleydb.BDBHAMessageStore</class>
>
> <environment-path>${QPID_WORK}/bdbhastore/eutilrhs1</environment-path>
>           <highAvailability>
>              <groupName>ReplicationGroup</groupName>
>              <nodeName>eutilrhs1</nodeName>
>              <nodeHostPort>eutilrhs1:5001</nodeHostPort>
>              <helperHostPort>eutilrhs1:5001</helperHostPort>
>              <durability>SYNC\,SYNC\,SIMPLE_MAJORITY</durability>
>              <coalescingSync>false</coalescingSync>
>              <designatedPrimary>true</designatedPrimary>
>           </highAvailability>
>        </store>
> ....
>    </test>
> <virtualhost>
>
> I know it working because I have a couple of queues setup as durable.  I
> publish durable messages to those queues, cycle the broker, and the message
> persist.  I can also see the messages being written to the bdbhastore
> directory.  I added -DJEMonitor=true to the qpid-server script and now I
> have a "com.sleepycat.je.jmx" element in the jconsole tree, but I still
> don't have the BDBHAMessageStore element.
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/JMX-interface-with-Java-Broker-20-tp7596278p7596312.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: JMX interface with Java Broker .20

Posted by jbelch <ja...@verizon.net>.
My active node's configuration looks like the following:

<virtualhost>
    <name>test</name>
    <test>
       <store>
         
<class>org.apache.qpid.server.store.berkeleydb.BDBHAMessageStore</class>
         
<environment-path>${QPID_WORK}/bdbhastore/eutilrhs1</environment-path>
          <highAvailability>
             <groupName>ReplicationGroup</groupName>
             <nodeName>eutilrhs1</nodeName>
             <nodeHostPort>eutilrhs1:5001</nodeHostPort>
             <helperHostPort>eutilrhs1:5001</helperHostPort>
             <durability>SYNC\,SYNC\,SIMPLE_MAJORITY</durability>
             <coalescingSync>false</coalescingSync>
             <designatedPrimary>true</designatedPrimary>
          </highAvailability>
       </store>
....
   </test>
<virtualhost>

I know it working because I have a couple of queues setup as durable.  I
publish durable messages to those queues, cycle the broker, and the message
persist.  I can also see the messages being written to the bdbhastore
directory.  I added -DJEMonitor=true to the qpid-server script and now I
have a "com.sleepycat.je.jmx" element in the jconsole tree, but I still
don't have the BDBHAMessageStore element.  



--
View this message in context: http://qpid.2158936.n2.nabble.com/JMX-interface-with-Java-Broker-20-tp7596278p7596312.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: JMX interface with Java Broker .20

Posted by Robbie Gemmell <ro...@gmail.com>.
The BDBHAMessageStore MBean will show up for a particular virtualhost if it
is using the BDBHAMessageStore, which suggests that you aren't actually
doing so.

I notice that you linked to the 0.22 docs below, but you mention in the
title you are using a 0.20 broker. There was a typo in the example within
the 0.20 docs showing how to configure the store in the xml, which might be
what you have run into if you originally looked at the older docs, where
the virtualhost name element contains "myhost" whereas the configuration
tag beneath it is 'myvhost', when it should equal whatever the name is. If
your config looks right, send it out and we can take a look.

BDB also has its own stats MBean that may be of use, you can turn it on by
setting the JEMonitor system property to true. You can pass system
properties through the QPID_OPTS environment variable, e.g: export
QPID_OPTS="-DJEMonitor=true"

Robbie

On 1 August 2013 01:48, jbelch <ja...@verizon.net> wrote:

> I was reading the "Qpid JMX API for HA" section today at
>
> http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-High-Availability-JMXAPI.html
> and it looked like it would be fairly simple to get Berkeley DB state
> infomration using the JMX Java API.  I can get information from other
> MBeans
> in the JVM, but I can't seem to get anything from BDBHAMessageStore in code
> and I can't see the BDBHAMessageStore element under the org.apache.qpid
> tree
> in the JConsole.  Any ideas on what I am doing wrong?  Is there something I
> have to enable in the configuration files before I startup the qpid server?
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/JMX-interface-with-Java-Broker-20-tp7596278.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>