Hi Janesh, When I try "activemq-admin.bat stop", then I'm getting following exception trace:
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: java.net.ConnectException: Connection refused: connect] 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: java.net.ConnectException: Connection refused: connect] at org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:104) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) 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:222) at org.apache.activemq.console.Main.main(Main.java:106) 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: java.net.ConnectException: Connection refused: connect] ---------------- When I try "java -jar run.jar stop", then I get following exception: 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: java.net.ConnectException: Connection refused: connect] 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: java.net.ConnectException: Connection refused: connect] at org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:104) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) 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:222) at org.apache.activemq.console.Main.main(Main.java:106) Could you please help me figuring out the problem? -Madhav On Wed, Aug 13, 2008 at 7:38 AM, Janesh S <[EMAIL PROTECTED]> wrote: > > Hi, > > Finally I wrote the scripts myself and thought of sharing it on the forum > for public reference: > > #!/bin/sh > # Startup script for Apache ActiveMQ > ################################################################### > > MQ_HOME=<full-path>/apache-activemq-5.1.0 > > cd $MQ_HOME/bin > > export SUNJMX="-Dcom.sun.management.jmxremote.port=1099 > -Dcom.sun.management.jmxremote.authenticate=false > -Dcom.sun.management.jmxremote.ssl=false > -Dcom.sun.management.jmxremote=true" > > ./activemq & > > > #!/bin/sh > # Shutdown script for Apache ActiveMQ > ######################################################### > > MQ_HOME=<full-path>/apache-activemq-5.1.0 > cd $MQ_HOME/bin > java -jar run.jar stop > > Regards, > Jan > > -- > View this message in context: > http://www.nabble.com/How-to-shutdown-activemq-5.1.0-server--tp18884711p18955816.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- -Madhav