Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 43236 invoked from network); 29 Sep 2010 08:17:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Sep 2010 08:17:59 -0000 Received: (qmail 34142 invoked by uid 500); 29 Sep 2010 08:17:58 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 33924 invoked by uid 500); 29 Sep 2010 08:17:56 -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 33895 invoked by uid 99); 29 Sep 2010 08:17:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 08:17:56 +0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chubrilo@gmail.com designates 209.85.214.43 as permitted sender) Received: from [209.85.214.43] (HELO mail-bw0-f43.google.com) (209.85.214.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 08:17:50 +0000 Received: by bwz16 with SMTP id 16so535320bwz.2 for ; Wed, 29 Sep 2010 01:17:29 -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=Df6pSED3zm4PRUanCuN+rB8XzfJMvOyLexw0F6Y99fg=; b=O2QK2L0HFuRpCrFq7xZYGddOW9On4kFwCb709O5JpXwZlO7whyUZv55SIC3Qhr/LgQ TiVyDe55DLGDxWvGuyTGGMS2aDsb3eCkloFzAeSojCcinnCryrwcqL7AF+N7cUyTxPOq 5zgFZoIWPtwGJt4zN1o0aby5de5fTjdm88XXU= 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=FzpMnBg3bcrEE/Hw4pvvfMayMcLHOlkEOOB4SGF4JGrllMt56JPOT9BByfw9JgI4of JIyJBVyLItQ+6u/szRoCnOOoZrVGvEiLl72LDzh9JgBNqGcTw2E+lhJZubOQBg485djJ R4ZrAfvYXUH1HaR3WNYWZhrYn+hK5893XDk5I= MIME-Version: 1.0 Received: by 10.204.56.197 with SMTP id z5mr973790bkg.89.1285748249762; Wed, 29 Sep 2010 01:17:29 -0700 (PDT) Sender: chubrilo@gmail.com Received: by 10.204.120.198 with HTTP; Wed, 29 Sep 2010 01:17:29 -0700 (PDT) In-Reply-To: <1285705599734-2717869.post@n4.nabble.com> References: <1285705599734-2717869.post@n4.nabble.com> Date: Wed, 29 Sep 2010 10:17:29 +0200 X-Google-Sender-Auth: 8AsMdM8pUJK72dqkax2RqZsdPNw Message-ID: Subject: Re: exception trying to stop activemq, stomp weirdness 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, the stop script tries first to connect to the broker using JMX and stop it "cleanly" and if it doesn't succeed it kills it. So make sure you enable it in your activemq.xml 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 Tue, Sep 28, 2010 at 10:26 PM, rrwoods wrote: > > I'm on Red Hat Enterprise Linux 5, in case that matters. =A0ActiveMQ 5.4.= 0 is > installed to /usr/local/activemq, and a user named 'activemq' owns this > directory and everything in it (via `chown -R activemq > /usr/local/activemq`). =A0The behavior described here happens when I take= the > actions described either as 'root' or as 'activemq'. > > If I say `activemq start`, I get a java process running and `netstat -a` > shows port 61616 being used. =A0`activemq stop` throws a Java exception, = then > terminates ActiveMQ with SIGKILL: > > $ bin/activemq stop > INFO: Using default configuration > (you can configure options in one of these file: /etc/default/activemq > /home/activemq/.activemqrc) > > INFO: Invoke the following command to create a configuration file > bin/activemq setup [ /etc/default/activemq | /home/activemq/.activemqrc ] > > INFO: Using java '/usr/bin/java' > INFO: Waiting at least 30 seconds for regular process termination of pid > '6206' : Java Runtime: Sun Microsystems Inc. 1.6.0_21 /usr/java/jre1.6.0_= 21 > =A0Heap sizes: current=3D15552k =A0free=3D15146k =A0max=3D249472k > =A0 =A0JVM args: -Dactivemq.classpath=3D/usr/local/activemq/conf; > -Dactivemq.home=3D/usr/local/activemq -Dactivemq.base=3D/usr/local/active= mq > ACTIVEMQ_HOME: /usr/local/activemq > ACTIVEMQ_BASE: /usr/local/activemq > Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrm= i > 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: localhost; 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: localhost; nested > exception is: > =A0 =A0 =A0 =A0java.net.ConnectException: Connection refused] > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownComma= nd.java:106) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractCommand.execute(AbstractComma= nd.java:57) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJm= xCommand.java:292) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.jav= a:137) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractCommand.execute(AbstractComma= nd.java:57) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:8= 3) > =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Met= hod) > =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Sou= rce) > =A0 =A0 =A0 =A0at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown= Source) > =A0 =A0 =A0 =A0at java.lang.reflect.Method.invoke(Unknown Source) > =A0 =A0 =A0 =A0at org.apache.activemq.console.Main.runTaskClass(Main.java= :251) > =A0 =A0 =A0 =A0at org.apache.activemq.console.Main.main(Main.java:107) > ERROR: java.lang.Exception: java.io.IOException: Failed to retrieve > RMIServer stub: javax.naming.ServiceUnavailableException [Root exception = is > java.rmi.ConnectException: Connection refused to host: localhost; nested > exception is: > =A0 =A0 =A0 =A0java.net.ConnectException: Connection refused] > java.lang.Exception: java.io.IOException: Failed to retrieve RMIServer st= ub: > javax.naming.ServiceUnavailableException [Root exception is > java.rmi.ConnectException: Connection refused to host: localhost; nested > exception is: > =A0 =A0 =A0 =A0java.net.ConnectException: Connection refused] > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownComma= nd.java:107) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractCommand.execute(AbstractComma= nd.java:57) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJm= xCommand.java:292) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.jav= a:137) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractCommand.execute(AbstractComma= nd.java:57) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:8= 3) > =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Met= hod) > =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Sou= rce) > =A0 =A0 =A0 =A0at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown= Source) > =A0 =A0 =A0 =A0at java.lang.reflect.Method.invoke(Unknown Source) > =A0 =A0 =A0 =A0at org.apache.activemq.console.Main.runTaskClass(Main.java= :251) > =A0 =A0 =A0 =A0at org.apache.activemq.console.Main.main(Main.java:107) > Caused by: java.io.IOException: Failed to retrieve RMIServer stub: > javax.naming.ServiceUnavailableException [Root exception is > java.rmi.ConnectException: Connection refused to host: localhost; nested > exception is: > =A0 =A0 =A0 =A0java.net.ConnectException: Connection refused] > =A0 =A0 =A0 =A0at javax.management.remote.rmi.RMIConnector.connect(Unknow= n Source) > =A0 =A0 =A0 =A0at javax.management.remote.JMXConnectorFactory.connect(Unk= nown > Source) > =A0 =A0 =A0 =A0at javax.management.remote.JMXConnectorFactory.connect(Unk= nown > Source) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnector= (AbstractJmxCommand.java:214) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnectio= n(AbstractJmxCommand.java:237) > =A0 =A0 =A0 =A0at > org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownComma= nd.java:70) > =A0 =A0 =A0 =A0... 11 more > Caused by: javax.naming.ServiceUnavailableException [Root exception is > java.rmi.ConnectException: Connection refused to host: localhost; nested > exception is: > =A0 =A0 =A0 =A0java.net.ConnectException: Connection refused] > =A0 =A0 =A0 =A0at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknow= n Source) > =A0 =A0 =A0 =A0at com.sun.jndi.toolkit.url.GenericURLContext.lookup(Unkno= wn Source) > =A0 =A0 =A0 =A0at javax.naming.InitialContext.lookup(Unknown Source) > =A0 =A0 =A0 =A0at > javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(Unknown Source= ) > =A0 =A0 =A0 =A0at javax.management.remote.rmi.RMIConnector.findRMIServer(= Unknown > Source) > =A0 =A0 =A0 =A0... 17 more > Caused by: java.rmi.ConnectException: Connection refused to host: localho= st; > nested exception is: > =A0 =A0 =A0 =A0java.net.ConnectException: Connection refused > =A0 =A0 =A0 =A0at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Sou= rce) > =A0 =A0 =A0 =A0at sun.rmi.transport.tcp.TCPChannel.createConnection(Unkno= wn Source) > =A0 =A0 =A0 =A0at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown = Source) > =A0 =A0 =A0 =A0at sun.rmi.server.UnicastRef.newCall(Unknown Source) > =A0 =A0 =A0 =A0at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Sourc= e) > =A0 =A0 =A0 =A0... 22 more > Caused by: java.net.ConnectException: Connection refused > =A0 =A0 =A0 =A0at java.net.PlainSocketImpl.socketConnect(Native Method) > =A0 =A0 =A0 =A0at java.net.PlainSocketImpl.doConnect(Unknown Source) > =A0 =A0 =A0 =A0at java.net.PlainSocketImpl.connectToAddress(Unknown Sourc= e) > =A0 =A0 =A0 =A0at java.net.PlainSocketImpl.connect(Unknown Source) > =A0 =A0 =A0 =A0at java.net.SocksSocketImpl.connect(Unknown Source) > =A0 =A0 =A0 =A0at java.net.Socket.connect(Unknown Source) > =A0 =A0 =A0 =A0at java.net.Socket.connect(Unknown Source) > =A0 =A0 =A0 =A0at java.net.Socket.(Unknown Source) > =A0 =A0 =A0 =A0at java.net.Socket.(Unknown Source) > =A0 =A0 =A0 =A0at > sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Sourc= e) > =A0 =A0 =A0 =A0at > sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Sourc= e) > =A0 =A0 =A0 =A0... 27 more > .............................. > INFO: Regular shutdown not successful, =A0sending SIGKILL to process with= pid > '6206' > > This is acceptable, but obviously less than desirable. =A0What might be > causing this? > -- > View this message in context: http://activemq.2283324.n4.nabble.com/excep= tion-trying-to-stop-activemq-stomp-weirdness-tp2717869p2717869.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >