activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Schöchlin (JIRA) <>
Subject [jira] Updated: (AMQ-2453) start/control-script is not suitable for professional environments
Date Wed, 11 Nov 2009 17:53:52 GMT


Marc Schöchlin updated AMQ-2453:

    Attachment: usage-example.txt

I wrote a new initscript for running standalone activemq installations
(see attached script).

This script is originally based on the scripts  "activemq" and
"activemq-admin" located in
"assembly/src/release/bin/" and replaces both scripts.

Read "usage-examples.txt" for  getting a first impression of the initscript.

Features of the new script:
- the script should be compatible with cygwin, macosx and most linux and
unix systems
  To ensure compatibility to macosx and cygwin it does not utilize lsb
standard infrastructure for controlling daemons like
   (i tried to keep the shell-syntax compatible to most unix systems,
but only tested on SLES11 and Ubuntu 9.10)
- the complete functionality if "activemq-admin" is now included in
  (list, query, browse, ...)
- all option not implemented by the initscript, are directly passed to
the java-call
- the configuration parameters can be located in
/etc/default/activemq.conf or  $HOME/.activemqrc
- the script supports operation of multiple instances on the same system
  (if the script is symlinked/renamed to
"activemq-instance-<INSTANCENAME>", the configuration
  is searched on /etc/default/activemq-instance-<INSTANCENAME>.conf and
- in case of syntax-errors in the configuration, the execution is stopped
- a template configuration for the script can be created by using the
"setup" option
- activemq configuration- and data-dir (e.g. kahadb, tmpstorage) are
- configuration hints for jmx (because of non-available
"VirtualMachine.attach(PID)", especially needed when using a ibm jvms)
- improved shutdown procedure: script invokes shutdown by a jmx-request,
if process does not disappear
  after a configurable timeout, the process is killed by SIGKILL (-9)
- start activemq daemon as an background process : option "start"
- start activemq daemon without daemonizing the daemon: option "fgstart"
- usage of PID files to determine running activemq instances
- the "status" option, checks if there is a running activemq instance
  (this is useful for using activemq with high-availability tools)
- the script outputs usage-information if it is invoked without any option
  (usage of the java binary combined with the script-usage)

In my opinion it would be good/nice:
- if this script is will be tested on several unix-systems and on cygwin
- to provide the possibility to configure the entire jmx-setup in
activemq.xml or jetty.xml
  (if jetty provides this)
- it would be nice if the java code supports daemonizing
- if this script will be part of activemq, we should adapt the wiki pages

Feedback and improvement ideas are very welcome :-)

> start/control-script is not suitable for professional environments
> ------------------------------------------------------------------
>                 Key: AMQ-2453
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>            Reporter: Marc Schöchlin
>         Attachments: activemq, usage-example.txt
> The start-scripts "activemq" and "activemq-admin" do not seem to be ready for production
> Reasons:
> - Server does not run in background
>   => this can be done by redirecting output to a file and run in background
>   => in my opinion this should be implemented directly in java
>   => the console log should be written by log4j to <install-root>/data/console.log
> - The process should be started on a non-root user 
>   => use 'su -c "$COMMAND" - $RUN_AS_USER' 
>   => this should be defined in /etc/activemq.conf
> - The script should support a "reload" feature to reload the configurartion
>   (if activemq supports reloading)
> - The script should support a "status" option
>   => this should show a quick overview about the state of activemq
>   => this should return a value != 0 if the service is not working
>      (this is important for cluster integration)
> Does anybody already working on these items?
> Do you have suggestions for a implementation?

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

View raw message