[ 
https://issues.apache.org/jira/browse/AMQ-6600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16703463#comment-16703463
 ] 

Mikhail Kolesnikov commented on AMQ-6600:
-----------------------------------------

Such exception are very hard to reproduce... The root cause -- AMQ create 
separate thread for controling each of connection:
{code:java}
public abstract class TransportThreadSupport extends TransportSupport 
implements Runnable {
    private Thread runner;
    protected void doStart() throws Exception {
        runner = new Thread(null, this, "ActiveMQ Transport: " + toString(), 
stackSize);
{code}

In case of some problem with connection this thread try to set "closed" status 
for connection and some times it happens *after* the *close* method called on 
Session object from main thread.

Generally, such an exception means that connection is broken.

> cannot open connection to broker when JAR file is missing (and misleading 
> error)
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-6600
>                 URL: https://issues.apache.org/jira/browse/AMQ-6600
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, JMS client
>    Affects Versions: 5.14.3
>         Environment: Broker: Remote on Windows Server 2012 R2 (IP: 
> 172.23.60.19)
> Client: local on Windows 7 (IP: 10.29.15.133)
>            Reporter: Daniel Held
>            Priority: Minor
>
> While trying to send a Message, I get an Error: Cannot send, channel has 
> already failed. However, it seems that this happens already during 
> establishing the connection (see Stacktrace).
> As this is an rather old project, we do not use Maven (yet). It seems that a 
> jar File is missing: hawtbuf-1.11.jar. Because i got no Classloading 
> problems, i did not check this first. However, I wonder why it is not 
> possible here to include some better error Message?
> Stacktrace on Client is as follows:
> javax.jms.JMSException: Cannot send, channel has already failed: 
> tcp://172.23.60.19:61616
>       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 
> org.apache.activemq.ActiveMQConnection.createQueueSession(ActiveMQConnection.java:1275)
>       at (my code follows)
> (and further down the Stacktrace:)
> Caused by: org.apache.activemq.transport.InactivityIOException: Cannot send, 
> channel has already failed: tcp://172.23.60.19:61616
>       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)
> The Server Log has the following Entry:
> WARN  | Transport Connection to: tcp://10.29.15.133:56578 failed: 
> java.io.EOFException | 
> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ 
> Transport: tcp:///10.29.15.133:56578@61616
> What I'm doing here is:
> QueueConnectionFactory qcf = (some Spring Bean)
> QueueConnection qc  = qcf.createQueueConnection();
> QueueSession qs  = qc.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to