Try removing: -Dcom.sun.management.jmxremote In the 'ActiveMQ in Action' book it states (emphasis mine): "Don’t let the name of this property fool you, as it enables the JMX agent for local access ONLY."
Remote access can only be granted once "com.sun.management.jmxremote.port" is assigned a value. With both defines present I'm not sure what the resultant behavior would be as they seem to be 'fighting' each other. Also, simplify things by experimenting with JMX authentication turned off. Set com.sun.management.jmxremote.authenticate=false and remove the other JMX related auth defines. Worth a try. Thanks, Paul On Thu, Jul 11, 2013 at 2:41 PM, chiragpujara <chiragpuj...@gmail.com> wrote: > Thanks for reply. I had to set createConnector=true bcs I was getting > exception when I stop activemq. > > Exception: > > Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi > 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] > 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] > at > org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:116) > at > org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) > at > org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387) > at > org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150) > at > org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) > at > org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at org.apache.activemq.console.Main.runTaskClass(Main.java:262) > at org.apache.activemq.console.Main.main(Main.java:115) > 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] > > How can I stop ativemq without this exception. It waits for 30 seconds and > kills process. > > How do I fix it. > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669150.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com.