Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 45418 invoked from network); 8 Jan 2009 09:10:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2009 09:10:56 -0000 Received: (qmail 37773 invoked by uid 500); 8 Jan 2009 09:10:54 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 37753 invoked by uid 500); 8 Jan 2009 09:10:54 -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 37742 invoked by uid 99); 8 Jan 2009 09:10:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2009 01:10:54 -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 (athena.apache.org: domain of chubrilo@gmail.com designates 209.85.198.245 as permitted sender) Received: from [209.85.198.245] (HELO rv-out-0708.google.com) (209.85.198.245) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2009 09:10:45 +0000 Received: by rv-out-0708.google.com with SMTP id f25so7651723rvb.26 for ; Thu, 08 Jan 2009 01:10:25 -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=r7810Zh9mMMhDcIB0hQoKdAFTYDIzdW9iz0q6H23MD8=; b=M/T+IOfJkXr/vcr3+B5SgANZtAZVmcqZi3BXcWSMLN8nwxQOFZY0ulPDPB/v6AJyYT snVg7LTpcR/eeqteeRcjaN0qcOPJmHPiozftPI255S+2eA9h8bRlAahBnLZAd07+liXp c2RqOSuRlEUsBX4Z2iVQFkvqJtz2m3mmLome8= 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=PcuVzZW0XT0zf87Ltybfev14XB8qaqRaJsJPxtWuyWS0DI9Uti9/DtnE4nd73BOJrA o7lFrxPyT12T+XaJIxDkAMPDwYcx95G2maIooY0pDB0kTIoVQTrTwr8NMYb1wdw4jFZc lj5xnaK1V9Wqt4lKulDH2qLT7Pdxw8+ZmVGrI= Received: by 10.114.148.2 with SMTP id v2mr15942359wad.26.1231405824879; Thu, 08 Jan 2009 01:10:24 -0800 (PST) Received: by 10.114.166.15 with HTTP; Thu, 8 Jan 2009 01:10:24 -0800 (PST) Message-ID: <36e91d9d0901080110m43c2fb1aua765de4f93e805dd@mail.gmail.com> Date: Thu, 8 Jan 2009 10:10:24 +0100 From: "Dejan Bosanac" Sender: chubrilo@gmail.com To: users@activemq.apache.org Subject: Re: Shutdown script not working as JMX authentication set up In-Reply-To: <21329465.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_209667_6100122.1231405824875" References: <21329465.post@talk.nabble.com> X-Google-Sender-Auth: 417b3a438cf17ac5 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_209667_6100122.1231405824875 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, you need to provide JMX username and password using the appropriate command line switches. Take a look at this page for more info http://activemq.apache.org/activemq-command-line-tools-reference.html#ActiveMQCommandLineToolsReference-shutdown Cheers -- Dejan Bosanac Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Wed, Jan 7, 2009 at 12:27 PM, Richie84 wrote: > > Hi All, > > This is my first post on this forum so apologies if the details of my query > are vague in anyway. > > The problem I am having is creating a shutdown script for activemq, when > JMX > is set up to use authentication through the jmx.access and jmx.password > files. When trying to execute the script it returns errors as follows; > > 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:597) > at org.apache.activemq.console.Main.runTaskClass(Main.java:225) > at org.apache.activemq.console.Main.main(Main.java:106) > > I have searched the forums and came across this post, > ( > http://www.nabble.com/How-to-shutdown-ActiveMQ-through-.-shutdown-script-after-securing-JMX-td12974377.html#a12974377 > ), > however this does not appear to work. My shutdown script looks like the > following; > > #!/bin/sh > # Shutdown script for Apache ActiveMQ > ######################################################### > > JAVA_HOME=/usr/local/java/jdk1.6.0_11 > export JAVA_HOME=$JAVA_HOME > export SUNJMX="-Djmx.userid=controlRole -Djmx.password=****" > > MQ_HOME=/usr/local/apache-activemq/apache-activemq-5.2.0/bin > cd $MQ_HOME > ./activemq-admin stop > > I hope the above is clear, if anyone has got any ideas on how to get this > working it would be greatly appreciated > > Regards > > Richard > > > -- > View this message in context: > http://www.nabble.com/Shutdown-script-not-working-as-JMX-authentication-set-up-tp21329465p21329465.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > ------=_Part_209667_6100122.1231405824875--