Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 51225 invoked from network); 6 Jan 2009 11:57:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jan 2009 11:57:44 -0000 Received: (qmail 79927 invoked by uid 500); 6 Jan 2009 11:57:42 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 79898 invoked by uid 500); 6 Jan 2009 11:57:42 -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 79887 invoked by uid 99); 6 Jan 2009 11:57:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 03:57:42 -0800 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chubrilo@gmail.com designates 209.85.218.15 as permitted sender) Received: from [209.85.218.15] (HELO mail-bw0-f15.google.com) (209.85.218.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 11:57:31 +0000 Received: by bwz8 with SMTP id 8so22673399bwz.14 for ; Tue, 06 Jan 2009 03:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=IyjvZ9HN6OS0v4GQTR9sPjNfrz6BAIBMdiOFeNa/fZk=; b=jlLoVir/s7PtL2owtWSaXvKwbYcNk62X2hPwMmKlQQwiT4Omm2dRtptGXrbE2F/6XP npJJo4vacw6K4G+0spQC1tZwl9aMsvxP/sveneZDCRNWO5U3Q0x3eImkM8NSXQyV0d/X h+NrL/33mqWEPNYsob7UyB1hE9HszU+dcDuU8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=hoewypXeZyAd+vIaf8PmNgEeJFaF1S79RlJhwVlU71JSAtMoUY0pKYJdsm+Y0EHCL2 QhmzRRair4zLtyKkOoS39e8nshR1YCDRjga1MiJkoM69LlljHlCoF1rW+wzJV7XxWh2H XkemdD/kPFmRj9FQJWSeFpC11gvFgJo0MC2xI= Received: by 10.103.115.12 with SMTP id s12mr7536732mum.89.1231243030980; Tue, 06 Jan 2009 03:57:10 -0800 (PST) Received: by 10.103.168.13 with HTTP; Tue, 6 Jan 2009 03:57:10 -0800 (PST) Message-ID: <36e91d9d0901060357s60a29dcbhb3a79c6a00b736fb@mail.gmail.com> Date: Tue, 6 Jan 2009 12:57:10 +0100 From: "Dejan Bosanac" Sender: chubrilo@gmail.com To: users@activemq.apache.org Subject: Re: Unable to Stop ActiveMQ Broker from activemq-admin script In-Reply-To: <21304038.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_250196_18729581.1231243030973" References: <21304038.post@talk.nabble.com> X-Google-Sender-Auth: e6c48b6f3661fec4 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_250196_18729581.1231243030973 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline The problem is that activemq-admin gets configuration from /etc/activemq.conf if it is available. Can you try putting your SUNJMX in bin/activemq and see what happens? As for the run.jar, you have to pass your JMX username and password with --jmxuser and --jmxpassword switches. Cheers -- Dejan Bosanac Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Tue, Jan 6, 2009 at 4:20 AM, MaenXe wrote: > > I recently tried to password protect the JMX Connector using the > instructions > here: > http://activemq.apache.org/jmx.html#JMX-PasswordProtectingtheJMXConnector > > Now when I try to stop the broker using "activemq-admin stop" I get the > following error: > > Error: Exception thrown by the agent : java.rmi.server.ExportException: > Port > already in use: 1099; nested exception is: > java.net.BindException: Address already in use > > If I try to stop the broker using "java -jar run.jar stop", I get: > > ERROR: java.lang.RuntimeException: Failed to execute stop task. Reason: > java.lang.SecurityException: Authentication failed! Credentials required > java.lang.RuntimeException: Failed to execute stop task. Reason: > java.lang.SecurityException: Authentication failed! Credentials required > at > > org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:106) > at > > org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) > at > > org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:224) > at > > org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129) > at > > org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) > at > org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.activemq.console.Main.runTaskClass(Main.java:225) > at org.apache.activemq.console.Main.main(Main.java:106) > ERROR: java.lang.Exception: java.lang.SecurityException: Authentication > failed! Credentials required > java.lang.Exception: java.lang.SecurityException: Authentication failed! > Credentials required > at > > org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:107) > at > > org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) > at > > org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:224) > at > > org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129) > at > > org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) > at > org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.activemq.console.Main.runTaskClass(Main.java:225) > at org.apache.activemq.console.Main.main(Main.java:106) > Caused by: java.lang.SecurityException: Authentication failed! Credentials > required > at > > com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticationFailure(JMXPluggableAuthenticator.java:193) > at > > com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticate(JMXPluggableAuthenticator.java:145) > at > > sun.management.jmxremote.ConnectorBootstrap$AccessFileCheckerAuthenticator.authenticate(ConnectorBootstrap.java:182) > at > > javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:212) > at > javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:179) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) > at > > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) > at java.lang.Thread.run(Thread.java:595) > at > > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) > at > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) > at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown > Source) > at > > javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2239) > at > javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:271) > at > > javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248) > at > > javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:207) > at > > org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnector(AbstractJmxCommand.java:146) > at > > org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnection(AbstractJmxCommand.java:169) > at > > org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:70) > ... 11 more > > I'm specifying the SUNJMX options through /etc/activemq.conf. They are as > follows: > > SUNJMX="-Dcom.sun.management.jmxremote.port=1099 > -Dcom.sun.management.jmxremote.ssl=false > -Dcom.sun.management.jmxremote.authenticate=true > > -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password > > -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access" > > Per the instructions, I am not creating a JMX connector thru the > activemq.xml config file. Also I'm noticing that the JMX Connector is not > running on port 1099, netstat shows it running on a different port each > time > I start the broker. > > > -- > View this message in context: > http://www.nabble.com/Unable-to-Stop-ActiveMQ-Broker-from-activemq-admin-script-tp21304038p21304038.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > ------=_Part_250196_18729581.1231243030973--