You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Nige <ni...@dpworld.com.au> on 2007/10/19 08:13:54 UTC

Intermittent error "org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long."

We started using activeMQ to send messages from our EDI gateway to our
application systems. Everything had gone well during testing, which included
volume testing. However, we have experienced a time outs on 2 separate
occasions which resulting in no messages being exchanged between the 2
systems which has caused us to roll back to our FTP based solution.
We use a java application to queue and dequeue messages on server B and use
Sterling Commerce's Gentran Integration Suite on Server B.

I have seen some information posted in this forum about setting timeout
values but we have been unable to get these set up in the activemq.xml file.

Being an activeMQ novice, and not being a Java programmer, I would
appreciate some advice on this issue and, if possible, what specifically I
should set in the xml configuration file.

The details of our configuration is listed below (including the full error
message).

Thanks in advance for any help.

Server A Environment
====================
O/S = Solaris 9 9/04
activeMQ Version = 4.1.1
Java Version = 1.4.2_12

Server B Environment
====================
O/S = Tru64 4.0F
activeMQ Version = 4.1.1
Java Version = 1.4.2-6 (highest available for Tru64)

Error on Server B
=================
INFO  DemandForwardingBridge         - Network connection between
vm://Server B#4 and tcp:///Server A:61616 shutdown due to a local error:
org.apache.activemq.transport.InactivityIOException: Channel was inactive
for too long.

Netstat details
===============
tcp        0      0  Server B.61616    Server A.44031     ESTABLISHED
tcp     6907      0  Server B.1337     Server A.61616     CLOSE_WAIT

activemq.xml from Server A
==========================
<beans>

  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker brokerName="Server A" useJmx="true"
xmlns="http://activemq.org/config/1.0">
  
    <!-- In ActiveMQ 4, you can setup destination policies -->  
    <destinationPolicy>
      <policyMap><policyEntries>
        
          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>
  
    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5" dataDirectory="./activemq-data"
dataSource="#oracle-ds"/>
    </persistenceAdapter>
  
    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"/>
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>
    
    <networkConnectors>
      <networkConnector name="Server B"
uri="static://(tcp://XX.XXX.XX.XX:61616)"/>
    </networkConnectors>
    
  </broker>
  
  <!-- Oracle DataSource Sample Setup -->
  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
    <property name="url" value="jdbc:oracle:thin:@XX.XXX.XX.XX:1521:XXXXX"/>
    <property name="username" value="XXXXX"/>
    <property name="password" value="XXXXX"/>
    <property name="poolPreparedStatements" value="false"/>
  </bean>
        
</beans>

activemq.xml from Server B
==========================
<beans>

  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker brokerName="Server B" useJmx="true"
xmlns="http://activemq.org/config/1.0">
  
    <destinationPolicy>
      <policyMap><policyEntries>
          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>
      </policyEntries></policyMap>
    </destinationPolicy>
  
    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5" dataDirectory="./data"
dataSource="#derby-ds"/>
    </persistenceAdapter>
  
    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"/>
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>
    
    <networkConnectors>
      <networkConnector name="Server A"
uri="static://(tcp://XX.XXX.XX.XX:61616)"/>
    </networkConnectors>
    
  </broker>
  
  <!-- Embedded Derby DataSource Setup -->
  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
    <property name="databaseName" value="derbydb"/>
    <property name="createDatabase" value="create"/>
  </bean>

</beans>
-- 
View this message in context: http://www.nabble.com/Intermittent-error-%22org.apache.activemq.transport.InactivityIOException%3A-Channel-was-inactive-for-too-long.%22-tf4651314s2354.html#a13288940
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Intermittent error "org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long."

Posted by Nige <ni...@dpworld.com.au>.
Thanks Joe.

I tried this on server B. In the log last night, we had the timeout message
and then it seemed to establish the connection to server A again. However,
server A had an error in its log saying:

INFO  DemandForwardingBridge         - Network connection between
vm://server A#0 and tcp:///XXX.XX.XXX.XX:61616 shutdown due to a local
error: java.io.IOException: The transport is not running.

After this, no messages were flowing so I had to restart activeMQ on server
A.

Is this because I did not apply the wireFormat.maxInactivityDuration=0
setting on server A?

Nige


Try setting 'maxInactivityDuration' to zero. For example,

tcp://localhost:61616?wireFormat.maxInactivityDuration=0

According to the online documentation, this should disable inactivity
monitoring. 

http://activemq.apache.org/configuring-wire-formats.html

Joe 
-- 
View this message in context: http://www.nabble.com/Intermittent-error-%22org.apache.activemq.transport.InactivityIOException%3A-Channel-was-inactive-for-too-long.%22-tf4651314s2354.html#a13376644
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Intermittent error "org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long."

Posted by ttmdev <jo...@ttmsolutions.com>.
Try setting 'maxInactivityDuration' to zero. For example,

tcp://localhost:61616?wireFormat.maxInactivityDuration=0

According to the online documentation, this should disable inactivity
monitoring. 

http://activemq.apache.org/configuring-wire-formats.html

Joe 


Nige wrote:
> 
> We started using activeMQ to send messages from our EDI gateway to our
> application systems. Everything had gone well during testing, which
> included volume testing. However, we have experienced a time outs on 2
> separate occasions which resulting in no messages being exchanged between
> the 2 systems which has caused us to roll back to our FTP based solution.
> We use a java application to queue and dequeue messages on server B and
> use Sterling Commerce's Gentran Integration Suite on Server B.
> 
> I have seen some information posted in this forum about setting timeout
> values but we have been unable to get these set up in the activemq.xml
> file.
> 
> Being an activeMQ novice, and not being a Java programmer, I would
> appreciate some advice on this issue and, if possible, what specifically I
> should set in the xml configuration file.
> 
> The details of our configuration is listed below (including the full error
> message).
> 
> Thanks in advance for any help.
> 
> Server A Environment
> ====================
> O/S = Solaris 9 9/04
> activeMQ Version = 4.1.1
> Java Version = 1.4.2_12
> 
> Server B Environment
> ====================
> O/S = Tru64 4.0F
> activeMQ Version = 4.1.1
> Java Version = 1.4.2-6 (highest available for Tru64)
> 
> Error on Server B
> =================
> INFO  DemandForwardingBridge         - Network connection between
> vm://Server B#4 and tcp:///Server A:61616 shutdown due to a local error:
> org.apache.activemq.transport.InactivityIOException: Channel was inactive
> for too long.
> 
> Netstat details
> ===============
> tcp        0      0  Server B.61616    Server A.44031     ESTABLISHED
> tcp     6907      0  Server B.1337     Server A.61616     CLOSE_WAIT
> 
> activemq.xml from Server A
> ==========================
> <beans>
> 
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>   
>   <broker brokerName="Server A" useJmx="true"
> xmlns="http://activemq.org/config/1.0">
>   
>     <!-- In ActiveMQ 4, you can setup destination policies -->  
>     <destinationPolicy>
>       <policyMap><policyEntries>
>         
>           <policyEntry topic="FOO.>">
>             <dispatchPolicy>
>               <strictOrderDispatchPolicy />
>             </dispatchPolicy>
>             <subscriptionRecoveryPolicy>
>               <lastImageSubscriptionRecoveryPolicy />
>             </subscriptionRecoveryPolicy>
>           </policyEntry>
> 
>       </policyEntries></policyMap>
>     </destinationPolicy>
>   
>     <persistenceAdapter>
>       <journaledJDBC journalLogFiles="5" dataDirectory="./activemq-data"
> dataSource="#oracle-ds"/>
>     </persistenceAdapter>
>   
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>     </transportConnectors>
>     
>     <networkConnectors>
>       <networkConnector name="Server B"
> uri="static://(tcp://XX.XXX.XX.XX:61616)"/>
>     </networkConnectors>
>     
>   </broker>
>   
>   <!-- Oracle DataSource Sample Setup -->
>   <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>     <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
>     <property name="url"
> value="jdbc:oracle:thin:@XX.XXX.XX.XX:1521:XXXXX"/>
>     <property name="username" value="XXXXX"/>
>     <property name="password" value="XXXXX"/>
>     <property name="poolPreparedStatements" value="false"/>
>   </bean>
>         
> </beans>
> 
> activemq.xml from Server B
> ==========================
> <beans>
> 
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>   
>   <broker brokerName="Server B" useJmx="true"
> xmlns="http://activemq.org/config/1.0">
>   
>     <destinationPolicy>
>       <policyMap><policyEntries>
>           <policyEntry topic="FOO.>">
>             <dispatchPolicy>
>               <strictOrderDispatchPolicy />
>             </dispatchPolicy>
>             <subscriptionRecoveryPolicy>
>               <lastImageSubscriptionRecoveryPolicy />
>             </subscriptionRecoveryPolicy>
>           </policyEntry>
>       </policyEntries></policyMap>
>     </destinationPolicy>
>   
>     <persistenceAdapter>
>       <journaledJDBC journalLogFiles="5" dataDirectory="./data"
> dataSource="#derby-ds"/>
>     </persistenceAdapter>
>   
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>     </transportConnectors>
>     
>     <networkConnectors>
>       <networkConnector name="Server A"
> uri="static://(tcp://XX.XXX.XX.XX:61616)"/>
>     </networkConnectors>
>     
>   </broker>
>   
>   <!-- Embedded Derby DataSource Setup -->
>   <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
>     <property name="databaseName" value="derbydb"/>
>     <property name="createDatabase" value="create"/>
>   </bean>
> 
> </beans>
> 

-- 
View this message in context: http://www.nabble.com/Intermittent-error-%22org.apache.activemq.transport.InactivityIOException%3A-Channel-was-inactive-for-too-long.%22-tf4651314s2354.html#a13349416
Sent from the ActiveMQ - User mailing list archive at Nabble.com.