[ 
https://issues.apache.org/jira/browse/AMQ-9711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17951042#comment-17951042
 ] 

Diptesh Chakraborty edited comment on AMQ-9711 at 5/12/25 7:40 PM:
-------------------------------------------------------------------

[~kenliao] 

1) ActiveMQ configured in master (broker name - master) and slave (broker name 
- slave) mode with KahaDB of both master and slave configured to a common NFS 
mount or any common directory

 
{code:java}
<broker xmlns="http://activemq.apache.org/schema/core"; brokerName="master" 
dataDirectory="${activemq.data}">
........
<persistenceAdapter>
            <kahaDB directory="/opt/appsdata/active_mq/"
</persistenceAdapter>
..........{code}
{code:java}
<broker xmlns="http://activemq.apache.org/schema/core"; brokerName="slave" 
dataDirectory="${activemq.data}"> 
........ 
<persistenceAdapter>             
     <kahaDB directory="/opt/appsdata/active_mq/" 
</persistenceAdapter> 
..........
{code}
2) Set the JMX property in both the broker as below
{code:java}
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=15090 
-Dcom.sun.management.jmxremote.rmi.port=15090 
-Dcom.sun.management.jmxremote.local.only=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false" {code}
3) Start the broker with broker name as *master* so that it acquires a lock and 
the broker with broker name as *slave* waits for the lock

4) Run the above program pointing to slave broker details

 


was (Author: diptesh2007):
[~kenliao] 

1) ActiveMQ configured in master (broker name - master) and slave (broker name 
- slave) mode with KahaDB of both master and slave configured to a common NFS 
mount

 
{code:java}
<broker xmlns="http://activemq.apache.org/schema/core"; brokerName="master" 
dataDirectory="${activemq.data}">
........
<persistenceAdapter>
            <kahaDB directory="/opt/appsdata/active_mq/"
</persistenceAdapter>
..........{code}
{code:java}
<broker xmlns="http://activemq.apache.org/schema/core"; brokerName="slave" 
dataDirectory="${activemq.data}"> 
........ 
<persistenceAdapter>             
     <kahaDB directory="/opt/appsdata/active_mq/" 
</persistenceAdapter> 
..........
{code}
2) Set the JMX property in both the broker as below
{code:java}
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=15090 
-Dcom.sun.management.jmxremote.rmi.port=15090 
-Dcom.sun.management.jmxremote.local.only=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false" {code}
3) Start the broker with broker name as *master* so that it acquires a lock and 
the broker with broker name as *slave* waits for the lock

4) Run the above program pointing to slave broker details

 

> Cannot create MBean on ActiveMQ slave broker
> --------------------------------------------
>
>                 Key: AMQ-9711
>                 URL: https://issues.apache.org/jira/browse/AMQ-9711
>             Project: ActiveMQ Classic
>          Issue Type: Bug
>    Affects Versions: 5.16.2
>            Reporter: Diptesh Chakraborty
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> I have ActiveMQ in master slave mode with KahaDB shared across common file 
> system.
> I am encountering 
> {color:#FF0000}*javax.management.InstanceNotFoundException*{color}
> {code:java}
> String jmxUrl1 = "service:jmx:rmi:///jndi/rmi://" + remoteIp1 + 
> ":15090/jmxrmi"; 
> String brokerName1 = "slave";
> JMXServiceURL url1 = new JMXServiceURL(jmxUrl1);
> JMXConnector jmxConnector = JMXConnectorFactory.connect(url1, null);
> MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
> ObjectName queueObjectName1 = new ObjectName(
>                 "org.apache.activemq:type=Broker,brokerName=" + brokerName1 + 
> ",destinationType=Queue,destinationName=TestIn"
>         );{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to