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.