activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlange <mla...@anwb.nl>
Subject What is the proper way to configure multiple brokers on the same machine in regard to jmx
Date Wed, 17 Aug 2016 18:17:31 GMT
For various purposes, I wish to define various brokers on the same machine.
For example: some queues require ordering of data, and thus use the
replicatedLevelDb as persistence adapter, others don't even need persistence
or ordering and can use only memory in order to provide faster throughput,
etc...

Other than described in the page about jmx, just using the "default"
useJmx="true" parameter in the broker definition, does not change a thing.
("default" is quoted, as according to the docs this parameter is always in
effect)

So, I tried fiddling around, and got thus far:

In ACTIVEMQ_HOME/bin/env  I had to add / uncomment these lines (for now I
won't use authentication; might be added in a later stage, but first want to
see it "just work")

ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.port=11099 "
ACTIVEMQ_SUNJMX_START="$ACTIEVMQ_SUNJMX_START
-Dcom.sun.management.jmx.authenticate=false"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.ssl=false"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote"

in the broker definition (activemq.xml) I had to change this part:
        <managementContext>
            <managementContext createConnector="true"
                useMBeanServer="true"
                jmxDomainName="broker1"
                createMBeanServer="true"
                connectorHost="localhost"
                connectorPort="1099"
                />
        </managementContext>

This seems to work for the first broker. When starting the second broker,
which has a few different options:
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.port=12099 "
ACTIVEMQ_SUNJMX_START="$ACTIEVMQ_SUNJMX_START
-Dcom.sun.management.jmx.authenticate=false"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.ssl=false"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote"

and a managementContext like this:
        <managementContext>
            <managementContext 
                createConnector="true"
                useMBeanServer="true"
                jmxDomainName="broker2"
                createMBeanServer="true"
                connectorHost="localhost"
                connectorPort="1099"
                />
        </managementContext>

I get the exception that a server is already active (which is true, it's
started by the frist broker)
Failed to start JMX connector Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]. Will
restart man
agement to re-create JMX connector, trying to remedy this issue. |
org.apache.activemq.broker.jmx.ManagementContext | JMX connector

I had hoped that the second broker would try to find an active mbean service
and register at it, or otherwise starts one. (Same for the first broker); 

Is this possible (or are my wishes actually desirable) at all, or not? And
how to get this configured properly?






--
View this message in context: http://activemq.2283324.n4.nabble.com/What-is-the-proper-way-to-configure-multiple-brokers-on-the-same-machine-in-regard-to-jmx-tp4715589.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message