You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by suri009 <su...@diagonal-consulting.com> on 2006/11/16 13:18:56 UTC

Channel was inactive for too long


Hi all ActiveMq Gurus,

When iam trying to send objectMessage to broker, i get the following
exception after few successfull sends. 
I am using latest version of ActiveMq which is 4.0.2RC6. 

My Application requirement is: My server application needs to send
objectMessage of size 2MB to 10MB  to several java clients every 2 seconds
to update their live data. I dont need to persist the data. I am sending the
objectMessage to activeMq broker which inturn sending to the java clients.
Server app and activemq broker are running in the same machine, java clients
connect to broker in the network from different clients.

javax.jms.JMSException: Channel was inactive for too long.
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
	at
org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1447)
	at
org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1463)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
	at
org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:111)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
	at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:130)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:150)
	at
org.apache.activemq.transport.InactivityMonitor.readCheck(InactivityMonitor.java:102)
	at
org.apache.activemq.transport.InactivityMonitor.access$000(InactivityMonitor.java:36)
	at
org.apache.activemq.transport.InactivityMonitor$1.run(InactivityMonitor.java:52)
	at
edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:431)
	at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.runAndReset(FutureTask.java:198)
	at
edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:189)
	at
edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:213)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.activemq.transport.InactivityIOException: Channel was
inactive for too long.
	... 10 more

Iam using the following activemq.xml to start broker:

<beans xmlns="http://activemq.org/config/1.0">
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  <broker useJmx="true" persistent="false">
    <memoryManager>  
        <usageManager id="memory-manager" limit="20000000"/>
    </memoryManager>
    <managementContext>
       <managementContext connectorPort="1099"
jmxDomainName="org.apache.activemq"/>
    </managementContext>
    <destinationPolicy>
      <policyMap><policyEntries>
          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>
      </policyEntries></policyMap>
    </destinationPolicy>
    <transportConnectors>
       <transportConnector name="default"
uri="tcp://172.19.18.157:61616?soTimeout=10000&amp;connectionTimeout=30000"
discoveryUri="multicast://172.19.18.157"/>
    </transportConnectors>
  </broker>
</beans>

I am connecting to broker via ActiveMq Connection Uri: 
failover:(tcp://172.19.18.157:61616)?jms.useAsyncSend=true
And using the code: TopicConnectionFactory connFactory = new
ActiveMqConnectionFactory(theAboveUri); 

Why am i getting that exception? Is the above config correct for my
application requirement?  

Java clients connect to broker using uri: tcp://172.19.18.157:61616. Is this
correct? 

Thanks,
Suri
  

-- 
View this message in context: http://www.nabble.com/Channel-was-inactive-for-too-long-tf2642609.html#a7376622
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


RE: Channel was inactive for too long

Posted by suri009 <su...@diagonal-consulting.com>.

Thanks for your help. This seems working. For some of the clients i get the
following exception while connecting. 
I get this exception randomly for different clients when they start
connecting. 

Is my below configuration of activemq broker, publisher and subscriber
correct?

<transportConnectors>
       <transportConnector name="default"
uri="tcp://170.19.18.141:61616?soTimeout=10000&amp;connectionTimeout=30000"
discoveryUri="multicast://172.19.18.157"/>
    </transportConnectors>

client (Topic subscriber) is connecting using uri:
tcp://170.19.18.141:61616?wireFormat.maxInactivityDuration=0
Server (Topic Publisher) is connecting using uri:
failover:(tcp://172.19.18.157:61616)?jms.useAsyncSend=true&amp;wireFormat.maxInactivityDuration=0

javax.jms.JMSException: Wire format negociation timeout: peer did not send
his w
ire format.
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppo
rt.java:58)
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1125)
        at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(Activ
eMQConnection.java:1203)
        at
org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnecti
on.java:272)
        at
org.apache.activemq.ActiveMQConnection.createTopicSession(ActiveMQCon
nection.java:904)
        at
com.baa.tg.commons.jms.JmsMessageReceiver.initialize(JmsMessageReceiv
er.java:101)
        at
com.baa.tg.commons.jms.JmsMessageReceiver.startReceiver(JmsMessageRec
eiver.java:58)
        at com.test.tg.client.awt.JFMain$3.run(JFMain.java:249)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.io.IOException: Wire format negociation timeout: peer did
not se
nd his wire format.
        at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatN
egotiator.java:82)
        at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.ja
va:45)
        at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(Respons
eCorrelator.java:67)
        at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorr
elator.java:72)
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1115)
        ... 17 more




-- 
View this message in context: http://www.nabble.com/Channel-was-inactive-for-too-long-tf2642609.html#a7380376
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Channel was inactive for too long

Posted by suri009 <su...@diagonal-consulting.com>.
In addition to the above exception i see the following exception also
sometimes..

javax.jms.JMSException: java.io.EOFException
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
	at
org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1447)
	at
org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1463)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
	at
org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:111)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
	at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:130)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:150)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:101)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:358)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)


-- 
View this message in context: http://www.nabble.com/Channel-was-inactive-for-too-long-tf2642609.html#a7376830
Sent from the ActiveMQ - User mailing list archive at Nabble.com.