activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Multiple instances with ActiveMQ 5.4.1
Date Fri, 15 Oct 2010 08:15:28 GMT
Hi Phil,

yes, I observed the same during the tests, hence the changes in the
console project, that now supports that we pass the pid of the broker
we want to stop. But in order to make it work you need to modify the
activemq script as well and pass the pid when you stop the broker.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net



On Thu, Oct 14, 2010 at 11:37 PM, Phil Pickett <ppickett@vmware.com> wrote:
> It looks like specifying JMX properties with a unique port in each of the instance's
start scripts (i.e., broker1/bin/broker1, broker2/bin/broker2, ...) may resolve this.  I
also commented out the JMX properties in bin/activemq since I've defined it for the instances.
>
> Phil
>
> -----Original Message-----
> From: Phil Pickett [mailto:ppickett@vmware.com]
> Sent: Thursday, October 14, 2010 12:46 PM
> To: users@activemq.apache.org
> Subject: RE: Multiple instances with ActiveMQ 5.4.1
>
> Hi Dejan,
>
> Thanks a lot for creating the Jira and submitting the fix so quickly.  I had made the
same change in the bin/activemq script to use $ACTIVEMQ_BASE for the ACTIVEMQ_CONFIG_DIR and
ACTIVEMQ_DATA_DIR.  I've also rebuilt activemq-console and am using the new jar.
>
> This allows multiple instances to start, but shutting down an instance will still sometimes
shutdown another instance unintentionally.  I'll include a command line capture below to
illustrate this.  I've tracked the problem down to the org.apache.activemq.console.command.ShutdownCommand's
runTask method.  For some reason, execution drops down into the "Get the first broker only"
section where some unintended broker is added to the list and shutdown.  With the commands
below, I attempt to stop broker1.  The broker1 instance is stopped, but then broker2 is stopped
also.
>
> I haven't opened a Jira on this or the original issue since the scripts are new and I
can't tell based on the docs I've read if I'm missing something in the instance configuration
with the instance-specfic .activemqrc or activemq script.
>
> Phil
>
>
> [phil@fedora11b apache-activemq-5.4.1]$ broker1/bin/broker1 start
> INFO: Using default configuration
> (you can configure options in one of these file: /etc/default/activemq /home/phil/.activemqrc)
>
> INFO: Invoke the following command to create a configuration file
> /home/phil/apache-activemq-5.4.1/bin/activemq setup [ /etc/default/activemq | /home/phil/.activemqrc
]
>
> INFO: Using java '/usr/java/jdk1.6.0_21/bin/java'
> INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties
to get details
> INFO: pidfile created : '/home/phil/apache-activemq-5.4.1/broker1/data/activemq.pid'
(pid '24202')
>
> [phil@fedora11b apache-activemq-5.4.1]$ ps auxwww | grep java
> phil     24122 32.7 14.2 434856 146024 pts/3   Sl   11:33   0:05 /usr/java/jdk1.6.0_21/bin/java
-Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties
-Dcom.sun.management.jmxremote -Dactivemq.classpath=/home/phil/apache-activemq-5.4.1/broker2/conf;/home/phil/apache-activemq-5.4.1/broker2/conf;
-Dactivemq.home=/home/phil/apache-activemq-5.4.1 -Dactivemq.base=/home/phil/apache-activemq-5.4.1/broker2
-jar /home/phil/apache-activemq-5.4.1/bin/run.jar start
> phil     24202 72.2 14.1 434856 145560 pts/2   Sl   11:33   0:05 /usr/java/jdk1.6.0_21/bin/java
-Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties
-Dcom.sun.management.jmxremote -Dactivemq.classpath=/home/phil/apache-activemq-5.4.1/broker1/conf;/home/phil/apache-activemq-5.4.1/broker1/conf;
-Dactivemq.home=/home/phil/apache-activemq-5.4.1 -Dactivemq.base=/home/phil/apache-activemq-5.4.1/broker1
-jar /home/phil/apache-activemq-5.4.1/bin/run.jar start
> phil     24263  0.0  0.0   4200   700 pts/2    S+   11:33   0:00 grep java
>
> [phil@fedora11b apache-activemq-5.4.1]$ broker1/bin/broker1 stop
> INFO: Using default configuration
> (you can configure options in one of these file: /etc/default/activemq /home/phil/.activemqrc)
>
> INFO: Invoke the following command to create a configuration file
> /home/phil/apache-activemq-5.4.1/bin/activemq setup [ /etc/default/activemq | /home/phil/.activemqrc
]
>
> INFO: Using java '/usr/java/jdk1.6.0_21/bin/java'
> INFO: Waiting at least 30 seconds for regular process termination of pid '24202' : Java
Runtime: Sun Microsystems Inc. 1.6.0_21 /usr/java/jdk1.6.0_21/jre
>  Heap sizes: current=15552k  free=15188k  max=249472k
>    JVM args: -Dactivemq.classpath=/home/phil/apache-activemq-5.4.1/broker1/conf;/home/phil/apache-activemq-5.4.1/broker1/conf;
-Dactivemq.home=/home/phil/apache-activemq-5.4.1 -Dactivemq.base=/home/phil/apache-activemq-5.4.1/broker1
> ACTIVEMQ_HOME: /home/phil/apache-activemq-5.4.1
> ACTIVEMQ_BASE: /home/phil/apache-activemq-5.4.1/broker1
> Connecting to pid: 24122
> Stopping broker: broker2
> ..
> INFO: Regular shutdown not successful,  sending SIGKILL to process with pid '24202'
>
> [phil@fedora11b apache-activemq-5.4.1]$ ps auxwww | grep java
> phil     24356  0.0  0.0   4200   704 pts/2    S+   11:33   0:00 grep java
>
>

Mime
View raw message