activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Schöchlin <>
Subject Re: activemq-admin stop does not work
Date Tue, 16 Feb 2010 21:31:22 GMT

maybe the following init-script might be an option.

This script is also capable to run multiple instances of activemq.

-- Usage:

$ ./activemq
INFO: loading '/home/mschoechlin/.activemqrc'
INFO: useing java '/home/mschoechlin/myroot/ibm-java-x86_64-60/bin/java'
Java Runtime: IBM Corporation 1.6.0
  Heap sizes: current=4096k  free=3080k  max=524288k
    JVM args: -Xjcl:jclscar_24
_j2se_j9=1119744 -Djava.runtime.version=pxa6460sr6-20090925_01 (SR6)
-Xdump -Djava.class.path=.
_port_library _org.apache.harmony.vmi.portlib
ACTIVEMQ_HOME: /home/mschoechlin/temp/apache-activemq-5.3.0
ACTIVEMQ_BASE: /home/mschoechlin/temp/apache-activemq-5.3.0
Usage: Main [--extdir <dir>] [task] [task-options] [task data]

Tasks (default task is start):
    start           - Creates and starts a broker using a configuration
file, or a broker URI.
    stop            - Stops a running broker specified by the broker name.
    list            - Lists all available brokers in the specified JMX
    query           - Display selected broker component's attributes and
    browse          - Display selected messages in a specified destination.

Task Options (Options specific to each task):
    --extdir <dir>  - Add the jar files in the directory to the classpath.
    --version       - Display the version information.
    -h,-?,--help    - Display this help information. To display task
specific help, use Main [task] -h,-?,--help

Task Data:
    - Information needed by each specific task.

Tasks provided by the sysv init script:
    restart         - stop running instance (is there is one), start new
    fgstart         - start daemon in foreground, usful for debugging
    status          - check if activemq process is running
    setup           - create the specified configuration file for this
init script
                      (see next usage section)

Configuration of this script:
    The configuration of this script can be placed on
/etc/default/activemq or /home/mschoechlin/.activemqrc.
    To use addtional configurations for running multiple instances on
the same operating system
    rename or symlink script to a name matching to
    This changes the configuration location to
/etc/default/activemq-instance-<INSTANCENAME> and
    $HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in
/etc have higher precedence.


wrfeldmann schrieb:
> I've searched both forums and have found nothing specific to the problem I'm
> having.  I'm using activemq 5.3.0 with 2 servers running.  I've enabled all
> of the jmx components in the activemq.xml file
>         <managementContext>
>             <managementContext
> connectorPath="service:jmx:rmi://${}:1099/jmxrmi" />
>         </managementContext>
> and in both the bin/activemq and bin/activemq-admin
> We have 2 activemq servers up and running.  The server that starts first
> will stop properly when activemq-admin stop is issued.  The server that was
> started second and is attempting to acquire the exclusive lock will not stop
> when the activemq-admin stop is issued.
> before stop:
>  /usr/java/jre1.6.0_17/bin/java -Xmx512M
> -Dorg.apache.activemq.UseDedicatedTaskRunner=true
> -Dactivemq.classpath=/usr/local/messaging/messaging/conf;
> -Dactivemq.home=/usr/local/messaging/messaging
> -Dactivemq.base=/usr/local/messaging/messaging -jar
> /usr/local/messaging/messaging/bin/run.jar start
> actvemq-admin stop output:
> Java Runtime: Sun Microsystems Inc. 1.6.0_17 /usr/java/jre1.6.0_17
>   Heap sizes: current=7680k  free=7281k  max=506816k
>     JVM args: -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true
> -Dactivemq.classpath=/usr/local/messaging/messaging/conf;
> -Dactivemq.home=/usr/local/messaging/messaging
> -Dactivemq.base=/usr/local/messaging/messaging
> ACTIVEMQ_HOME: /usr/local/messaging/messaging
> ACTIVEMQ_BASE: /usr/local/messaging/messaging
> Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> INFO: There are no brokers to stop.
> after stop
> /usr/java/jre1.6.0_17/bin/java -Xmx512M
> -Dorg.apache.activemq.UseDedicatedTaskRunner=true
> -Dactivemq.classpath=/usr/local/messaging/messaging/conf;
> -Dactivemq.home=/usr/local/messaging/messaging
> -Dactivemq.base=/usr/local/messaging/messaging -jar
> /usr/local/messaging/messaging/bin/run.jar start
> Thanks,
> Rick

View raw message