After uncommenting the commandAgent entry in activemq.xml

    <commandAgent xmlns="http://activemq.apache.org/schema/core";
brokerUrl="vm://localhost"/>

sending a 'list' message to the ActiveMQ results in this message:

ERROR CommandMessageListener         - Failed to process message due to:
java.la
ng.Exception: java.io.IOException: Failed to retrieve RMIServer stub:
javax.nami
ng.ServiceUnavailableException [Root exception is java.rmi.ConnectException:
Con
nection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused: connect]. Message:
Active
MQTextMessage {commandId = 6, responseRequired = false, messageId =
ID:michael-1
526-1216989903562-2:2:1:1:2, originalDestination = null,
originalTransactionId =
 null, producerId = ID:michael-1526-1216989903562-2:2:1:1, destination =
topic:/
/ActiveMQ.Agent, transactionId = null, expiration = 0, timestamp =
1216989994343
, arrival = 0, brokerInTime = 1216989994343, brokerOutTime = 1216989994343,
corr
elationId = , replyTo = queue://q, persistent = false, type = , priority =
0, gr
oupID = null, groupSequence = 0, targetConsumerId = null, compressed =
false, us
erID = null, content = null, marshalledProperties = null, dataStructure =
null,
redeliveryCounter = 0, size = 1024, properties = null, readOnlyProperties =
true
, readOnlyBody = true, droppable = false, text = list}
java.lang.Exception: java.io.IOException: Failed to retrieve RMIServer stub:
jav
ax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectExcepti
on: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused: connect]
        at
org.apache.activemq.console.command.ListCommand.runTask(ListCommand.j
ava:50)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:129)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
        at
org.apache.activemq.console.ConsoleCommandHandler.processCommand(Cons
oleCommandHandler.java:50)
        at
org.apache.activemq.broker.util.CommandMessageListener.processCommand
(CommandMessageListener.java:83)
        at
org.apache.activemq.broker.util.CommandMessageListener.onMessage(Comm
andMessageListener.java:60)
        at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageC
onsumer.java:967)
        at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionE
xecutor.java:122)
        at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionEx
ecutor.java:192)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskR
unner.java:98)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRun
ner.java:36)
Caused by: java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.
ServiceUnavailableException [Root exception is java.rmi.ConnectException:
Connec
tion refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused: connect]
        at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:32
3)
        at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFacto
ry.java:248)
        at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFacto
ry.java:207)
        at
org.apache.activemq.console.filter.MBeansObjectNameQueryFilter.create
JmxConnector(MBeansObjectNameQueryFilter.java:162)
        at
org.apache.activemq.console.filter.MBeansObjectNameQueryFilter.queryM
Beans(MBeansObjectNameQueryFilter.java:114)
        at
org.apache.activemq.console.filter.MBeansObjectNameQueryFilter.query(
MBeansObjectNameQueryFilter.java:101)
        at
org.apache.activemq.console.filter.AbstractQueryFilter.query(Abstract
QueryFilter.java:43)
        at
org.apache.activemq.console.util.JmxMBeansUtil.getAllBrokers(JmxMBean
sUtil.java:44)
        at
org.apache.activemq.console.command.ListCommand.runTask(ListCommand.j
ava:47)
        ... 11 more
Caused by: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.
ConnectException: Connection refused to host: localhost; nested exception
is:
        java.net.ConnectException: Connection refused: connect]
        at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java
:101)
        at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.j
ava:185)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnect
or.java:1871)
        at
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.j
ava:1841)
        at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:25
7)
        ... 19 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost;
nes
ted exception is:
        java.net.ConnectException: Connection refused: connect
        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.newCall(UnicastRef.java:322)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java
:97)
        ... 24 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:180)
        at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:22)
        at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
        ... 29 more

System is Windows 2000 with all service packs / patches, jdk1.6.0_04

Transport connectors:

        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
            <transportConnector name="ssl" uri="ssl://localhost:61617"/>
            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
            <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
        </transportConnectors>

I have reported this problem in JIRA (AMQ-1737) already in May. I assumed
that it was related to STOMP only but the new test shows that the problem is
caused somewhere else.

Steps to reproduce:

* start admin console
* navigate to Topics - ActiveMQ.Agent
* send a message with content 'list' and 'Reply To'='MyReplyQueue'
* check ActiveMQ log file

Could somebody confirm, maybe it is just a configuration problem on my
systems

Best Regards
Michael Justin




-- 
View this message in context: 
http://www.nabble.com/ActiveMQ-5.1-%2B-5.2%3A-sending-%22list%22-to-ActiveMQ.Agent-topic-causes-stacktrace-tp18651374p18651374.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to