Hi, stop command tries first to connect to the broker using JMX, and waits for 30 sec to be stopped. Only after that it tries to kill it. Perhaps you don't have JMX turned on or the script for some reason cannot connect to it.
I opened a Jira issue to improve on this behavior https://issues.apache.org/activemq/browse/AMQ-2884 In the meantime, you can try to see why the client cannot connect to the the broker's JMX. Perhaps you should use --jmxurl option if you're not using standard host/port (http://activemq.apache.org/activemq-command-line-tools-reference.html#ActiveMQCommandLineToolsReference-shutdown) or modify ACTIVEMQ_KILL_MAXSECONDS variable in bin/activemq script to make this wait period shorter. 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 Sun, Aug 29, 2010 at 9:28 AM, Romain CHANU <romainch...@gmail.com> wrote: > Hi James, > > I have the issue as well. Have you found anything solution yet? > > Cheers, > > Romain > > On 25 August 2010 00:28, James Green <james.mk.gr...@gmail.com> wrote: > >> Hi, >> >> Using 5.4.0 I've symlinked /etc/init.d/activemq to >> /opt/activemq/bin/activemq and ran the setup command. >> >> I am able to start the process fine, but when I come to stop it I have >> to wait thirty seconds because of this: >> jam...@blofeld:/opt/activemq/conf$ sudo /etc/init.d/activemq stop >> INFO: Loading '/etc/default/activemq' >> INFO: Using java '/usr/bin/java' >> INFO: changing to user 'activemq' to invoke java >> INFO: Waiting at least 30 seconds for regular process termination of >> pid '25806' : Java Runtime: Sun Microsystems Inc. 1.6.0_18 >> /usr/lib/jvm/java-6-openjdk/jre >> Heap sizes: current=15872k free=15453k max=506816k >> JVM args: -Dactivemq.classpath=/opt/activemq/conf; >> -Dactivemq.home=/opt/activemq -Dactivemq.base=/opt/activemq >> ACTIVEMQ_HOME: /opt/activemq >> ACTIVEMQ_BASE: /opt/activemq >> ERROR: java.lang.RuntimeException: Failed to execute stop task. >> Reason: java.io.IOException: Failed to retrieve RMIServer stub: >> javax.naming.ServiceUnavailableException [Root exception is >> java.rmi.ConnectException: Connection refused to host: 127.0.0.1; >> nested exception is: >> java.net.ConnectException: Connection refused] >> java.lang.RuntimeException: Failed to execute stop task. Reason: >> java.io.IOException: Failed to retrieve RMIServer stub: >> javax.naming.ServiceUnavailableException [Root exception is >> java.rmi.ConnectException: Connection refused to host: 127.0.0.1; >> nested exception is: >> java.net.ConnectException: Connection refused] >> >> Etc. >> >> I've made attempts at tweaking things according to the web >> instructions without any changes being noticed. >> >> So what default settings do need changing for a Linux distribution to >> elegantly shut down the server? >> >> James >> >