Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 61973 invoked from network); 30 Aug 2010 08:17:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Aug 2010 08:17:41 -0000 Received: (qmail 50052 invoked by uid 500); 30 Aug 2010 08:17:40 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 49802 invoked by uid 500); 30 Aug 2010 08:17:39 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 49793 invoked by uid 99); 30 Aug 2010 08:17:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 08:17:38 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chubrilo@gmail.com designates 209.85.160.171 as permitted sender) Received: from [209.85.160.171] (HELO mail-gy0-f171.google.com) (209.85.160.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 08:17:32 +0000 Received: by gyg10 with SMTP id 10so2958195gyg.2 for ; Mon, 30 Aug 2010 01:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=/qq+enzcWRxp2m0HJmiN7mDpw0IuD4Epj0e1v1pl1hY=; b=Ci7/adgECJgiVwluucdXN6cb33FiT+J5ztwV2Nv5oZFyHHfXeLD5Zq85DaArd3Vc5/ T2La0xEDJAaLn/PqK/8Iyp7IYMnKcApstRS/YjleVxw1B/yrtX5on8fULOniNl/DjKni SoOsPTCPM1wePwb3eSo/XmOKrKImw4IPZT960= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=N1vf+2UWNhAjhxpXoo7w5wb4NsSYN/FZsjOkuHaV8zV5PLK5ZNOyWtn2RP8Xso5f1c i/6iXxc6/pbRdZoVlmcMRfr8zw6JOxMzIbWimaXBWZB116GJOqek+im0Vopu/Dddmxjh pC0DKS57qFhytYQEzgH6ZLjk9sHcTwSammwjg= MIME-Version: 1.0 Received: by 10.90.120.12 with SMTP id s12mr3252506agc.198.1283156226014; Mon, 30 Aug 2010 01:17:06 -0700 (PDT) Sender: chubrilo@gmail.com Received: by 10.42.3.18 with HTTP; Mon, 30 Aug 2010 01:17:05 -0700 (PDT) In-Reply-To: References: Date: Mon, 30 Aug 2010 10:17:05 +0200 X-Google-Sender-Auth: m1UeCtjzBCJn9D02VtX_D1FcmUs Message-ID: Subject: Re: Unix shell script to stop activemq From: Dejan Bosanac To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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#Acti= veMQCommandLineToolsReference-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 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 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: >> jamesg@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 >> =A0Heap sizes: current=3D15872k =A0free=3D15453k =A0max=3D506816k >> =A0 =A0JVM args: -Dactivemq.classpath=3D/opt/activemq/conf; >> -Dactivemq.home=3D/opt/activemq -Dactivemq.base=3D/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: >> =A0 =A0 =A0 =A0java.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: >> =A0 =A0 =A0 =A0java.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 >> >