activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-2974) Set ClientID - InvalidClientIDException with stomp
Date Wed, 29 Jun 2011 22:47:28 GMT

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

Timothy Bish commented on AMQ-2974:
-----------------------------------

ActiveMQ 5.x implements Stomp 1.0 which has no heartbeat mechanism to detect that a client
connection has dropped.  In the event that the socket drop is not detected then the tcp keepalive
won't kick in for up to two hours which is why you would see an error like this.  From the
brokers point of view the connection appears valid an the subscriber is assumed to still be
connected.

> Set ClientID - InvalidClientIDException with stomp
> --------------------------------------------------
>
>                 Key: AMQ-2974
>                 URL: https://issues.apache.org/jira/browse/AMQ-2974
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.4.0, 5.4.1
>            Reporter: Tom
>         Attachments: MQAlreadyConnectedTest.cs
>
>
> We are using the NMS stomp-client to communicate with ActiveMQ. Our Stomp-Clients are
mobile devices connected via GSM and loose the connection from time to time. Therefore we
are using durable subscriptions and the clients use a fixed but unique Client-ID. When they
loose the connection they can't reconnect because the server doesn't release the (failed)
connection.
> The server log looks like this:
> INFO  | Transport failed: java.io.IOException: Broker: localhost - Client: client1 already
connected from /xxx.xxx.xxx.xxx:yyyyy | org.apache.activemq.broker.TransportConnection.Transport
| ActiveMQ Transport: tcp:///xxx.xxx.xxx.xxx:yyyyy
> java.io.IOException: Broker: localhost - Client: client1 already connected from /xxx.xxx.xxx.xxx:zzzzz
>         at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:39)
>         at org.apache.activemq.transport.stomp.ProtocolConverter$2.onResponse(ProtocolConverter.java:510)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onActiveMQCommand(ProtocolConverter.java:579)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.oneway(StompTransportFilter.java:58)
>         at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
>         at org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1247)
>         at org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:808)
>         at org.apache.activemq.broker.TransportConnection.dispatchSync(TransportConnection.java:768)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:187)
>         at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:81)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:140)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompConnect(ProtocolConverter.java:503)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:192)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:70)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:219)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:201)
>         at java.lang.Thread.run(Thread.java:636)
> Caused by: javax.jms.InvalidClientIDException: Broker: localhost - Client: client1 already
connected from /xxx.xxx.xxx.xxx:yyyyy
>         at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:242)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:78)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:694)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:137)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:309)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
>         ... 10 more
> At the same time the NMS-Client logs the following:
> StompWireFormat - Received ERROR command: Broker: localhost - Client: client1 already
connected from /xxx.xxx.xxx.xxx:yyyyy
> The connection is not being released even after more than 10 minutes. I have to restart
the ActiveMQ server to be able to reconnect earlier.
> For me it looks quite similar to the following Issue: https://issues.apache.org/activemq/browse/AMQ-2831

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message