Command not showing output.
arvindwillcrossover opened this issue · 4 comments
java -jar a-1.4.9-SNAPSHOT-jar-with-dependencies.jar -b tcp://10.70.20.124:24152 -P admin -U admin -l
avax.jms.JMSException: Cannot send, channel has already failed: tcp://10.70.20.124:24152
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1413)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1478)
at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:329)
at co.nordlander.a.A.connect(A.java:378)
at co.nordlander.a.A.run(A.java:189)
at co.nordlander.a.A.main(A.java:157)
Caused by: org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://10.70.20.124:24152
at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:328)
at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:317)
at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:94)
at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:116)
at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81)
at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1388)
is there any reason why this error will occur ?
From my experience it is because you did not successfully connect to your broker.
channel has already failed: tcp://10.70.20.124:24152
Once I fixed connectivity issues, the problem went away.
Have the same issue with the OpenWire Protocol and an AWS ActiveMQ instance. No output is show, credentials are correct. Is the functionality of "--list-queues" working correctly?
Not sure about "channel has already failed". Something seems odd with connectivity.
@faabsen --list-queues is pretty much experimental. ActiveMQ may (if not configured not to) fire messages to an advisory topic when queues (and topics) are created and deleted. This is the only way to actually query the broker for queues that I know of (using only the JMS API, and not going the JMX route).
There is an helper class in the ActiveMQ client accessible from the Connection that helps enumerating the queues and topics that A uses. However, it's not always 100% correct. Perhaps if the connection is a bit slow the advisory messages won't make it in time before A decides to call it a day and return. May need to hold the collection for some time.