You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dejan Bosanac (JIRA)" <ji...@apache.org> on 2009/11/06 15:20:52 UTC

[jira] Resolved: (AMQ-2306) Unable to monitor or manage slave brokers in shared filesystem master slave configuration

     [ https://issues.apache.org/activemq/browse/AMQ-2306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac resolved AMQ-2306.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 5.4.0

The broker starting sequence now first starts a jmx connector and then tries to boot the broker (including the persistence adapter). This will allow that the slave broker (with the port different than master) in shared file-system ms scenario will be reachable by jmx. However, since broker isn't started properly, there's no much point to do anything with it in this mode, except to stop it. This works fine with activemq-admin script and using "terminateVm()" jmx command (used by activemq-admin). I noticed that "stop()" jmx command doesn't fully work, since there are some threads left from persistence adapters trying to aquire locks, but that's the topic for some other issue. When master dies, the slave jmx connector becomes fully operable.

In case that master and slave have the same jmx port defined (which is often the case), the slave will detect that jmx connector is not started before acquiring the lock and will try to do it again afterwards. So users that deploy with this configuration will not be affected with this change.

> Unable to monitor or manage slave brokers in shared filesystem master slave configuration
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQ-2306
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2306
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, JMX
>    Affects Versions: 5.2.0
>            Reporter: Scott Clasen
>            Assignee: Dejan Bosanac
>             Fix For: 5.4.0
>
>
> It appears that when running in shared master slave configuration one cant connect to the jmx console or use activemq-admin to stop the slave.
> Start a slave with a master running
> ACTIVEMQ_HOME: /itdept/apache-activemq-5.2.0
> ACTIVEMQ_BASE: /itdept/apache-activemq-5.2.0
> Loading message broker from: xbean://itdept//messagebroker/activemq-config/broker3.xml
> INFO  BrokerService                  - Using Persistence Adapter: AMQPersistenceAdapter(/datafiles/itdept//activemq-journal)
> WARN  AMQPersistenceAdapter          - Waiting to Lock the Store /datafiles/itdept/activemq-journal
> Notice that no connections including jmx have been started...attempts to stop the broker with activemq-admin fail with..Caused by: java.net.ConnectException: Connection refused
> Kill the master and get
> INFO  AMQPersistenceAdapter          - Aquired lock for AMQ Store/datafiles/itdept/activemq-journal
> INFO  BrokerService                  - ActiveMQ 5.2.0 JMS Message Broker (messagebroker3) is starting
> INFO  BrokerService                  - For help or more information please see: http://activemq.apache.org/
> INFO  KahaStore                      - Kaha Store using data directory /datafiles/itdept/activemq-journal/kr-store/data
> INFO  ManagementContext              - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:55563/jmxrmi
> INFO  TransportServerThreadSupport   - Listening for connections at: tcp://0.0.0.0:55553
> INFO  TransportConnector             - Connector tcp Started
> INFO  BrokerService                  - ActiveMQ JMS Message Broker (messagebroker3, ID:nymb02d-59998-1245957027403-0:0) started
> INFO  log                            - Logging to org.slf4j.impl.JCLLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
> INFO  log                            - jetty-6.1.9
> INFO  log                            - WebApp@1288520654 at http://0.0.0.0:55573/admin
> INFO  log                            - Started SelectChannelConnector@0.0.0.0:55573
> Now you can connect via JMX and concole....
> brokers are very simply configured...
> broker3 
> <broker:broker useJmx="true" persistent="true" brokerName="messagebroker3">
>         <broker:managementContext>
>             <broker:managementContext connectorPort="55563" jmxDomainName="messagebroker3"/>
>         </broker:managementContext>
>         <broker:persistenceAdapter>
>             <broker:amqPersistenceAdapter directory="/datafiles/itdept/activemq-journal"/>
>         </broker:persistenceAdapter>
>         <broker:transportConnectors>
>             <broker:transportConnector name="tcp" uri="tcp://0.0.0.0:55553"/>
>         </broker:transportConnectors>
>     </broker:broker>
> broker 4 
>  <broker:broker useJmx="true" persistent="true" brokerName="messagebroker4">
>         <broker:managementContext>
>             <broker:managementContext connectorPort="55564" jmxDomainName="messagebroker4"/>
>         </broker:managementContext>
>         <broker:persistenceAdapter>
>             <broker:amqPersistenceAdapter directory="/datafiles/itdept/activemq-journal"/>
>         </broker:persistenceAdapter>
>         <broker:transportConnectors>
>             <broker:transportConnector name="tcp" uri="tcp://0.0.0.0:55554"/>
>         </broker:transportConnectors>
>     </broker:broker>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.