You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Scott <li...@hotmail.com> on 2011/09/05 12:48:41 UTC

I Can't Stop ActiveMQ

Hi folk,

I was not able to stop activemq via follow command:
$ activemq/apache-activemq-5.5.0/bin/activemq-admin stop

Please help me. By the way, I can't use remote JMX as well even 1099 port is
listening:
$ netstat -tulpen | grep 1099
(No info could be read for "-p": geteuid()=502 but you should be root.)
tcp        0      0 :::1099                     :::*                       
LISTEN      503        4206806    -


Java Runtime: Sun Microsystems Inc. 1.6.0_26 /usr/java/jdk1.6.0_26/jre
  Heap sizes: current=61184k  free=60505k  max=978048k
    JVM args:
-Dactivemq.classpath=/home/activemq/apache-activemq-5.5.0/conf;
-Dactivemq.home=/home/activemq/apache-activemq-5.5.0
-Dactivemq.base=/home/activemq/apache-activemq-5.5.0
ACTIVEMQ_HOME: /home/activemq/apache-activemq-5.5.0
ACTIVEMQ_BASE: /home/activemq/apache-activemq-5.5.0
Connecting to pid: 17439
ERROR: java.lang.RuntimeException: Failed to execute stop task. Reason:
java.rmi.ConnectException: Connection refused to host: 10.50.39.76; nested
exception is:
        java.net.ConnectException: Connection refused
java.lang.RuntimeException: Failed to execute stop task. Reason:
java.rmi.ConnectException: Connection refused to host: 10.50.39.76; nested
exception is:
        java.net.ConnectException: Connection refused
        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:316)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        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:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
ERROR: java.lang.Exception: java.rmi.ConnectException: Connection refused to
host: 10.50.39.76; nested exception is:
        java.net.ConnectException: Connection refused
java.lang.Exception: java.rmi.ConnectException: Connection refused to host:
10.50.39.76; nested exception is:
        java.net.ConnectException: Connection refused
        at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:108)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:316)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        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:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: java.rmi.ConnectException: Connection refused to host:
10.50.39.76; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
        at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
        at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
        at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown
Source)
        at
javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2329)
        at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:279)
        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:214)
        at
org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnection(AbstractJmxCommand.java:237)
        at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:71)
        ... 11 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.<init>(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:189)
        at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
        at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
        ... 22 more
[duration@listmqvm home]$ sudo
activemq/apache-activemq-5.5.0/bin/activemq-admin stop
Java Runtime: Sun Microsystems Inc. 1.6.0_26 /usr/java/jdk1.6.0_26/jre
  Heap sizes: current=61184k  free=60505k  max=978048k
    JVM args:
-Dactivemq.classpath=/home/activemq/apache-activemq-5.5.0/conf;
-Dactivemq.home=/home/activemq/apache-activemq-5.5.0
-Dactivemq.base=/home/activemq/apache-activemq-5.5.0
ACTIVEMQ_HOME: /home/activemq/apache-activemq-5.5.0
ACTIVEMQ_BASE: /home/activemq/apache-activemq-5.5.0
Connecting to pid: 17439
ERROR: java.lang.RuntimeException: Failed to execute stop task. Reason:
java.rmi.ConnectException: Connection refused to host: 10.50.39.76; nested
exception is:
        java.net.ConnectException: Connection refused
java.lang.RuntimeException: Failed to execute stop task. Reason:
java.rmi.ConnectException: Connection refused to host: 10.50.39.76; nested
exception is:
        java.net.ConnectException: Connection refused
        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:316)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        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:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
ERROR: java.lang.Exception: java.rmi.ConnectException: Connection refused to
host: 10.50.39.76; nested exception is:
        java.net.ConnectException: Connection refused
java.lang.Exception: java.rmi.ConnectException: Connection refused to host:
10.50.39.76; nested exception is:
        java.net.ConnectException: Connection refused
        at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:108)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:316)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        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:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: java.rmi.ConnectException: Connection refused to host:
10.50.39.76; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
        at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
        at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
        at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown
Source)
        at
javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2329)
        at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:279)
        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:214)
        at
org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnection(AbstractJmxCommand.java:237)
        at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:71)
        ... 11 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.<init>(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:189)
        at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
        at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)


--
View this message in context: http://activemq.2283324.n4.nabble.com/I-Can-t-Stop-ActiveMQ-tp3790975p3790975.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: I Can't Stop ActiveMQ

Posted by Torsten Mielke <to...@fusesource.com>.
Can you try providing the --jmxurl argument to the stop script?
Is your broker really running a JMX listener on 10.50.39.76, port 1099?

The "Connection refused" error normally means there is no process listening on the port you're trying to connect. 
Alternatively you can stop the broker using a kill -TERM, it should shutdown the broker gracefully as well.



Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com