You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "vik dhawan (JIRA)" <ji...@apache.org> on 2008/04/09 18:16:33 UTC

[jira] Created: (AMQ-1655) Failed to add Connection warning for the new connections from STOMP clients

Failed to add Connection warning for the new connections from STOMP clients
---------------------------------------------------------------------------

                 Key: AMQ-1655
                 URL: https://issues.apache.org/activemq/browse/AMQ-1655
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.0.0
         Environment: AMQ 5.0 Stable release on Solaris 10
            Reporter: vik dhawan
            Priority: Minor


When STOP clients polls the AMQ for new messages after every 15 seconds. we get following warnings very frequently (not always but a lot of times). 



2008-04-09 11:33:47,172 [21.146.25:38733] WARN  TransportConnection            - Failed to add Connection
javax.jms.InvalidClientIDException: Broker: localhost - Client: WRK_omega_8755 already connected from /IP:PORT
        at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:79)
        at org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:120)
        at org.apache.activemq.transport.stomp.ProtocolConverter.onStompConnect(ProtocolConverter.java:424)
        at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommad(ProtocolConverter.java:155)
        at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:69)
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:185)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
        at java.lang.Thread.run(Thread.java:619)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1655) Failed to add Connection warning for the new connections from STOMP clients

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

Dejan Bosanac resolved AMQ-1655.
--------------------------------

    Resolution: Won't Fix
      Assignee: Dejan Bosanac

I can only reproduce this problem by trying to connect/disconnect durable subscriber very fast, like in the following test
    
{code}
public void testMultipleConnect() throws Exception {
    	for (int i = 0; i < 100; i++) {
    		StompConnection stompConnection = new StompConnection();
                URI connectUri = new URI(bindAddress);
                stompConnection.open(createSocket(connectUri));
    		stompConnection.connect("system", "manager", "test");
    		stompConnection.disconnect();
    		//Thread.sleep(1);
    	}
    }
{code}

the problem is that sometimes CONNECT command arrives before previous DISCONNECT and than the broker fails to create a connection.

I don't think we can do much about it and this use case is a bit of a misuse of Stomp. A simple workaround is to add a small (even 1ms works) pause just to get commands in order. But generally you should think of reusing your connections better.

I'll resolve this issue for now, but if this is not your use case or you can help to reproduce the problem with another example, please reopen it.

> Failed to add Connection warning for the new connections from STOMP clients
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-1655
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1655
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.0.0
>         Environment: AMQ 5.0 Stable release on Solaris 10
>            Reporter: vik dhawan
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> When STOP clients polls the AMQ for new messages after every 15 seconds. we get following warnings very frequently (not always but a lot of times). 
> 2008-04-09 11:33:47,172 [21.146.25:38733] WARN  TransportConnection            - Failed to add Connection
> javax.jms.InvalidClientIDException: Broker: localhost - Client: WRK_omega_8755 already connected from /IP:PORT
>         at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
>         at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:79)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:120)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompConnect(ProtocolConverter.java:424)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommad(ProtocolConverter.java:155)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:69)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:185)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>         at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.