You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Guy Allard (JIRA)" <ji...@apache.org> on 2012/10/14 16:23:02 UTC

[jira] [Created] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Guy Allard created AMQ-4106:
-------------------------------

             Summary: STOMP+NIO and Heartbeats gives consistent InactivityIOException
                 Key: AMQ-4106
                 URL: https://issues.apache.org/jira/browse/AMQ-4106
             Project: ActiveMQ
          Issue Type: Bug
          Components: stomp
    Affects Versions: 5.7.0
         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

AMQ: 5.7.0
Ubuntu: 11.10
Java: 1.6.0_24

>From activemq.xml:

<transportConnector name="stomp" 
  uri="stomp+nio://0.0.0.0:61613?trace=true"/>


            Reporter: Guy Allard


When a stomp 1.1 client:

a) connects to a stomp+nio transport
b) elects to send heartbeats when the network is idle

the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.

>From activemq.log:

2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker

>From wrapper.log:

INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440


I am able to reproduce this with either:

a) the current Ruby stomp gem
b) the current golang stompngo package

It is unclear to me whether:

a) the AMQ heartbeat code is not tolerant as the specification suggests
b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all

In all cases these tests succeed with either:

a) AMQ 5.7.0 stomp without nio
b) Apollo
c) RabbitMQ
d) a client that only receives heartbeats, but does not send them

I will attach a Ruby client example shortly.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-4106.
-------------------------------

    Resolution: Fixed

Fixed now, also should fix a similar issue with AMQP NIO transports. 
                
> STOMP+NIO and Heartbeats gives consistent InactivityIOException
> ---------------------------------------------------------------
>
>                 Key: AMQ-4106
>                 URL: https://issues.apache.org/jira/browse/AMQ-4106
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.7.0
>         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> AMQ: 5.7.0
> Ubuntu: 11.10
> Java: 1.6.0_24
> From activemq.xml:
> <transportConnector name="stomp" 
>   uri="stomp+nio://0.0.0.0:61613?trace=true"/>
>            Reporter: Guy Allard
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: nioheartb.rb
>
>
> When a stomp 1.1 client:
> a) connects to a stomp+nio transport
> b) elects to send heartbeats when the network is idle
> the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.
> From activemq.log:
> 2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker
> From wrapper.log:
> INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440
> I am able to reproduce this with either:
> a) the current Ruby stomp gem
> b) the current golang stompngo package
> It is unclear to me whether:
> a) the AMQ heartbeat code is not tolerant as the specification suggests
> b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all
> In all cases these tests succeed with either:
> a) AMQ 5.7.0 stomp without nio
> b) Apollo
> c) RabbitMQ
> d) a client that only receives heartbeats, but does not send them
> I will attach a Ruby client example shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482588#comment-13482588 ] 

Timothy Bish edited comment on AMQ-4106 at 10/23/12 7:16 PM:
-------------------------------------------------------------

Fixed now, also should fix a similar issue with AMQP and MQTT NIO transports. 
                
      was (Author: tabish121):
    Fixed now, also should fix a similar issue with AMQP NIO transports. 
                  
> STOMP+NIO and Heartbeats gives consistent InactivityIOException
> ---------------------------------------------------------------
>
>                 Key: AMQ-4106
>                 URL: https://issues.apache.org/jira/browse/AMQ-4106
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.7.0
>         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> AMQ: 5.7.0
> Ubuntu: 11.10
> Java: 1.6.0_24
> From activemq.xml:
> <transportConnector name="stomp" 
>   uri="stomp+nio://0.0.0.0:61613?trace=true"/>
>            Reporter: Guy Allard
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: nioheartb.rb
>
>
> When a stomp 1.1 client:
> a) connects to a stomp+nio transport
> b) elects to send heartbeats when the network is idle
> the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.
> From activemq.log:
> 2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker
> From wrapper.log:
> INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440
> I am able to reproduce this with either:
> a) the current Ruby stomp gem
> b) the current golang stompngo package
> It is unclear to me whether:
> a) the AMQ heartbeat code is not tolerant as the specification suggests
> b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all
> In all cases these tests succeed with either:
> a) AMQ 5.7.0 stomp without nio
> b) Apollo
> c) RabbitMQ
> d) a client that only receives heartbeats, but does not send them
> I will attach a Ruby client example shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482411#comment-13482411 ] 

Timothy Bish commented on AMQ-4106:
-----------------------------------

There's a couple issues in the NIO layer mainly relating to not keeping the TcpTransports receiverCounter moving which causes the InactivityMonitor to think that no reads are occurring when we are only getting STOMP keep alives which are just newlines.  The StompCodec also has a bug that's causing it to get stuck because of this. 
                
> STOMP+NIO and Heartbeats gives consistent InactivityIOException
> ---------------------------------------------------------------
>
>                 Key: AMQ-4106
>                 URL: https://issues.apache.org/jira/browse/AMQ-4106
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.7.0
>         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> AMQ: 5.7.0
> Ubuntu: 11.10
> Java: 1.6.0_24
> From activemq.xml:
> <transportConnector name="stomp" 
>   uri="stomp+nio://0.0.0.0:61613?trace=true"/>
>            Reporter: Guy Allard
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: nioheartb.rb
>
>
> When a stomp 1.1 client:
> a) connects to a stomp+nio transport
> b) elects to send heartbeats when the network is idle
> the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.
> From activemq.log:
> 2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker
> From wrapper.log:
> INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440
> I am able to reproduce this with either:
> a) the current Ruby stomp gem
> b) the current golang stompngo package
> It is unclear to me whether:
> a) the AMQ heartbeat code is not tolerant as the specification suggests
> b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all
> In all cases these tests succeed with either:
> a) AMQ 5.7.0 stomp without nio
> b) Apollo
> c) RabbitMQ
> d) a client that only receives heartbeats, but does not send them
> I will attach a Ruby client example shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481830#comment-13481830 ] 

Timothy Bish commented on AMQ-4106:
-----------------------------------

Was able to reproduce some issue in a JUnit, will take a look.
                
> STOMP+NIO and Heartbeats gives consistent InactivityIOException
> ---------------------------------------------------------------
>
>                 Key: AMQ-4106
>                 URL: https://issues.apache.org/jira/browse/AMQ-4106
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.7.0
>         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> AMQ: 5.7.0
> Ubuntu: 11.10
> Java: 1.6.0_24
> From activemq.xml:
> <transportConnector name="stomp" 
>   uri="stomp+nio://0.0.0.0:61613?trace=true"/>
>            Reporter: Guy Allard
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: nioheartb.rb
>
>
> When a stomp 1.1 client:
> a) connects to a stomp+nio transport
> b) elects to send heartbeats when the network is idle
> the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.
> From activemq.log:
> 2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker
> From wrapper.log:
> INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440
> I am able to reproduce this with either:
> a) the current Ruby stomp gem
> b) the current golang stompngo package
> It is unclear to me whether:
> a) the AMQ heartbeat code is not tolerant as the specification suggests
> b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all
> In all cases these tests succeed with either:
> a) AMQ 5.7.0 stomp without nio
> b) Apollo
> c) RabbitMQ
> d) a client that only receives heartbeats, but does not send them
> I will attach a Ruby client example shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Posted by "Guy Allard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guy Allard updated AMQ-4106:
----------------------------

    Attachment: nioheartb.rb

Ruby client example.

                
> STOMP+NIO and Heartbeats gives consistent InactivityIOException
> ---------------------------------------------------------------
>
>                 Key: AMQ-4106
>                 URL: https://issues.apache.org/jira/browse/AMQ-4106
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.7.0
>         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> AMQ: 5.7.0
> Ubuntu: 11.10
> Java: 1.6.0_24
> From activemq.xml:
> <transportConnector name="stomp" 
>   uri="stomp+nio://0.0.0.0:61613?trace=true"/>
>            Reporter: Guy Allard
>         Attachments: nioheartb.rb
>
>
> When a stomp 1.1 client:
> a) connects to a stomp+nio transport
> b) elects to send heartbeats when the network is idle
> the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.
> From activemq.log:
> 2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker
> From wrapper.log:
> INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440
> I am able to reproduce this with either:
> a) the current Ruby stomp gem
> b) the current golang stompngo package
> It is unclear to me whether:
> a) the AMQ heartbeat code is not tolerant as the specification suggests
> b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all
> In all cases these tests succeed with either:
> a) AMQ 5.7.0 stomp without nio
> b) Apollo
> c) RabbitMQ
> d) a client that only receives heartbeats, but does not send them
> I will attach a Ruby client example shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQ-4106:
---------------------------------

    Assignee: Timothy Bish
    
> STOMP+NIO and Heartbeats gives consistent InactivityIOException
> ---------------------------------------------------------------
>
>                 Key: AMQ-4106
>                 URL: https://issues.apache.org/jira/browse/AMQ-4106
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.7.0
>         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> AMQ: 5.7.0
> Ubuntu: 11.10
> Java: 1.6.0_24
> From activemq.xml:
> <transportConnector name="stomp" 
>   uri="stomp+nio://0.0.0.0:61613?trace=true"/>
>            Reporter: Guy Allard
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: nioheartb.rb
>
>
> When a stomp 1.1 client:
> a) connects to a stomp+nio transport
> b) elects to send heartbeats when the network is idle
> the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.
> From activemq.log:
> 2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker
> From wrapper.log:
> INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440
> I am able to reproduce this with either:
> a) the current Ruby stomp gem
> b) the current golang stompngo package
> It is unclear to me whether:
> a) the AMQ heartbeat code is not tolerant as the specification suggests
> b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all
> In all cases these tests succeed with either:
> a) AMQ 5.7.0 stomp without nio
> b) Apollo
> c) RabbitMQ
> d) a client that only receives heartbeats, but does not send them
> I will attach a Ruby client example shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-4106) STOMP+NIO and Heartbeats gives consistent InactivityIOException

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQ-4106:
------------------------------

    Fix Version/s: 5.8.0
    
> STOMP+NIO and Heartbeats gives consistent InactivityIOException
> ---------------------------------------------------------------
>
>                 Key: AMQ-4106
>                 URL: https://issues.apache.org/jira/browse/AMQ-4106
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.7.0
>         Environment: Kernel:Linux tjjackson 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> AMQ: 5.7.0
> Ubuntu: 11.10
> Java: 1.6.0_24
> From activemq.xml:
> <transportConnector name="stomp" 
>   uri="stomp+nio://0.0.0.0:61613?trace=true"/>
>            Reporter: Guy Allard
>            Assignee: Timothy Bish
>             Fix For: 5.8.0
>
>         Attachments: nioheartb.rb
>
>
> When a stomp 1.1 client:
> a) connects to a stomp+nio transport
> b) elects to send heartbeats when the network is idle
> the first several heartbeat sends appear to succeed, but then the connection is forcibly closed by the broker.
> From activemq.log:
> 2012-10-14 09:53:07,755 | WARN  | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker
> From wrapper.log:
> INFO   | jvm 1    | 2012/10/14 09:53:07 |  WARN | Transport Connection to: tcp://127.0.0.1:36440 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:36440
> I am able to reproduce this with either:
> a) the current Ruby stomp gem
> b) the current golang stompngo package
> It is unclear to me whether:
> a) the AMQ heartbeat code is not tolerant as the specification suggests
> b) the AMQ heartbeat receiver is not reading or recognizing heartbeats at all
> In all cases these tests succeed with either:
> a) AMQ 5.7.0 stomp without nio
> b) Apollo
> c) RabbitMQ
> d) a client that only receives heartbeats, but does not send them
> I will attach a Ruby client example shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira