You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Danielius Jurna (JIRA)" <ji...@apache.org> on 2006/05/25 19:13:52 UTC

[jira] Created: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Stomp client is not removed from the broker on client disconnect
----------------------------------------------------------------

         Key: AMQ-724
         URL: https://issues.apache.org/activemq/browse/AMQ-724
     Project: ActiveMQ
        Type: Bug

  Components: Transport  
    Versions: 4.0    
 Environment: Linux, Java 1.5.0_06
    Reporter: Danielius Jurna


If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Danielius Jurna (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-724?page=all ]

Danielius Jurna updated AMQ-724:
--------------------------------

    Attachment: SessionState.patch

This patch is against 4.0 branch. This bug is also in 4.1 branch

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQ-724) Stomp client is not removed from the broker on client disconnect

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

Tom Vijlbrief updated AMQ-724:
------------------------------

    Attachment: patch.txt

PATCH
======

Not sure if it is this simple but this patch seems to work OK.

The connections are now freeed when a fresh client connects...



> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, patch.txt, SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Tom Vijlbrief (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38428 ] 

Tom Vijlbrief commented on AMQ-724:
-----------------------------------

I'm confused. When I try the netcat example with NoDisconnect in the current SVN version
everything is rock solid.

When I interrupt a C++ OpenWire client than I get non closed connections.

I found a possible cure for the last problem. The InactivityMonitor code reads:

public void onException(IOException error) {
    	if( monitorStarted.get() ) {
	        stopMonitorThreads();
	        getTransportListener().onException(error);
    	}
    }

So if monitorStarted is false the EOFException is completely ignored!
I assume it should be:

public void onException(IOException error) {
    	if( monitorStarted.get() ) {
	        stopMonitorThreads();
    	}
    	getTransportListener().onException(error); // tom.vijlbrief
    }


Attached a patch. With this patch the OpenWire sessions are closed.

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, patch.txt, SessionState.patch, StompScriptComplete.txt, StompScriptNoDisconnect.txt, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Martin Ronner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38425 ] 

Martin Ronner commented on AMQ-724:
-----------------------------------

Try {{netcat}} also without {{-c}} (close connection on EOF from stdin)...

The connection will be closed by the server in the first example.
In the second example you have to break it {{^C}} manually. This leaves an open session on the server.


> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, patch.txt, SessionState.patch, StompScriptComplete.txt, StompScriptNoDisconnect.txt, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Danielius Jurna (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_37903 ] 

Danielius Jurna commented on AMQ-724:
-------------------------------------

Is is possible for the provided patch to be applied for 4.2 version?

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Tom Vijlbrief (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38026 ] 

Tom Vijlbrief commented on AMQ-724:
-----------------------------------

When using the C++ Openwire client I'm having the same problems when the client crashes.

I'm testing against the current SVN repo version.

After 5 runs I have 5 pending openwire connections, although "netstat -t"
shows that they are closed.



> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Danielius Jurna (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=comments#action_36212 ] 

Danielius Jurna commented on AMQ-724:
-------------------------------------

The problem I found is whith both stomp transport and broker iself.
Somehow Stomp subscription starts prefetching and sending messages before it adds Consumer to the broker. If connection during this prefetching is lost, connection is removed, but subscription is still added.

There is quick  hack for that in AbstractConnection.processAddConsumer(): 

    public Response processAddConsumer(ConsumerInfo info) throws Exception {
        SessionId sessionId = info.getConsumerId().getParentId();
        ConnectionId connectionId = sessionId.getParentId();
        ConnectionState cs = lookupConnectionState(connectionId);
        SessionState ss = cs.getSessionState(sessionId);
        if( ss == null )
            throw new IllegalStateException("Cannot add a consumer to a session that had not been registered: "+sessionId);
        log.trace("Adding consumer to broker. Stomp client blocks here - waiting for prefetching to complete.");
        broker.addConsumer(cs.getContext(), info);
        try {
        		lookupConnectionState(connectionId);
        } catch (IllegalStateException ex) {
        		// If during broker.addConsumer() exception occures, connection is destroyed. We need to remove consumer
        		log.warn("Cannot find connection after adding subscription! Probably error when prefetching messages", ex);
        		broker.removeConsumer(cs.getContext(), info);
        		throw ex;
        }
        ss.addConsumer(info);
        return null;
    }

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>          Key: AMQ-724
>          URL: https://issues.apache.org/activemq/browse/AMQ-724
>      Project: ActiveMQ
>         Type: Bug

>   Components: Transport
>     Versions: 4.0
>  Environment: Linux, Java 1.5.0_06
>     Reporter: Danielius Jurna
>  Attachments: StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-724?page=all ]
     
Hiram Chirino resolved AMQ-724:
-------------------------------

    Fix Version: 4.0.2
                 4.1
     Resolution: Fixed

Fix apply to 4.0 trunk also.

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>          Key: AMQ-724
>          URL: https://issues.apache.org/activemq/browse/AMQ-724
>      Project: ActiveMQ
>         Type: Bug

>   Components: Transport
>     Versions: 4.0
>  Environment: Linux, Java 1.5.0_06
>     Reporter: Danielius Jurna
>     Assignee: james strachan
>      Fix For: 4.1, 4.0.2
>  Attachments: StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Tom Vijlbrief (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38031 ] 

Tom Vijlbrief commented on AMQ-724:
-----------------------------------

Retried the tests without the patch applied but see no difference now, so you can ignore it.
Apparently a fix was already in the SVN version, my  patch is a no-op. :-/

Terminating the Stomp connections in the current SVN version seems to work OK.

Terminating OpenWire connections from a  CPP client still leaves connections hanging.

I'll try to investigate this problem further.

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, patch.txt, SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Updated: (AMQ-724) Stomp client is not removed from the broker on client disconnect

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

Tom Vijlbrief updated AMQ-724:
------------------------------

    Attachment: patchInactivityMonitor.txt

Patch for pending OpenWire connections

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, patch.txt, patchInactivityMonitor.txt, SessionState.patch, StompScriptComplete.txt, StompScriptNoDisconnect.txt, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Danielius Jurna (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38032 ] 

Danielius Jurna commented on AMQ-724:
-------------------------------------

There is a clear bug in SessionState class. EIther you have to fix this bug, o remove SessionState functionality, if it's not used.
When broker shuts down session, it sets shutdown flag on session state. But currently in the code instead of true it sets false (which means that session is not shut down).
The bug is not releted with connections which are not removed. The problem occures when connection is removed, but subscription is not. It's not easy to reproduce this bug. You have to kill stomp connection during message prefetch (within a second after connection is established and subscribtion is made).

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, patch.txt, SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Updated: (AMQ-724) Stomp client is not removed from the broker on client disconnect

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

Tom Vijlbrief updated AMQ-724:
------------------------------

    Attachment: dumpemu4.png

Pending connections although the TCP connections are really closed

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=comments#action_36495 ] 

Hiram Chirino commented on AMQ-724:
-----------------------------------

Expanded your 'hack' so that it's less hacky.  The connection and session state now keep track if they are being shutdown.

Fix committed to trunk revision 418592.

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>          Key: AMQ-724
>          URL: https://issues.apache.org/activemq/browse/AMQ-724
>      Project: ActiveMQ
>         Type: Bug

>   Components: Transport
>     Versions: 4.0
>  Environment: Linux, Java 1.5.0_06
>     Reporter: Danielius Jurna
>     Assignee: james strachan
>  Attachments: StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Danielius Jurna (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-724?page=all ]

Danielius Jurna updated AMQ-724:
--------------------------------

    Attachment: StompSubscriptionRemoveTest.java

TestCase which shows this bug - takes time to complete.


> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>          Key: AMQ-724
>          URL: https://issues.apache.org/activemq/browse/AMQ-724
>      Project: ActiveMQ
>         Type: Bug

>   Components: Transport
>     Versions: 4.0
>  Environment: Linux, Java 1.5.0_06
>     Reporter: Danielius Jurna
>  Attachments: StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Chris Ochs (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-724?page=comments#action_37176 ] 
            
Chris Ochs commented on AMQ-724:
--------------------------------

This is not fixed as of 4.0.2 RC4, or at least there is another bug with the exact same behavior.  Wasn't hard to duplicate either, just kill a stomp connection while it's reading and bam, phantom consumer. 

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1
>
>         Attachments: StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "Danielius Jurna (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-724?page=all ]

Danielius Jurna reopened AMQ-724:
---------------------------------

             
I wonder how this bug has slipped through unit tests. I'm adding patch for org.apache.activemq.state.SessionState

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: SessionState.patch, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQ-724) Stomp client is not removed from the broker on client disconnect

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

Martin Ronner updated AMQ-724:
------------------------------

    Attachment: StompScriptNoDisconnect.txt
                StompScriptComplete.txt

That's how you can reproduce it:

{{$ netcat -v -c localhost 61613 < StompScriptComplete.txt}}
*CONNECT*, *SEND* a message and *DISCONNECT* properly.

{{$ netcat -v -c localhost 61613 < StompScriptNoDisconnect.txt}}
*CONNECT*, *SEND* a message and closes the connection {color:red}without{color} *DISCONNECT*.


> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>                 Key: AMQ-724
>                 URL: https://issues.apache.org/activemq/browse/AMQ-724
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.0
>         Environment: Linux, Java 1.5.0_06
>            Reporter: Danielius Jurna
>         Assigned To: james strachan
>             Fix For: 4.0.2, 4.1.0
>
>         Attachments: dumpemu4.png, patch.txt, SessionState.patch, StompScriptComplete.txt, StompScriptNoDisconnect.txt, StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

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


[jira] Assigned: (AMQ-724) Stomp client is not removed from the broker on client disconnect

Posted by "james strachan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-724?page=all ]

james strachan reassigned AMQ-724:
----------------------------------

    Assign To: james strachan

> Stomp client is not removed from the broker on client disconnect
> ----------------------------------------------------------------
>
>          Key: AMQ-724
>          URL: https://issues.apache.org/activemq/browse/AMQ-724
>      Project: ActiveMQ
>         Type: Bug

>   Components: Transport
>     Versions: 4.0
>  Environment: Linux, Java 1.5.0_06
>     Reporter: Danielius Jurna
>     Assignee: james strachan
>  Attachments: StompSubscriptionRemoveTest.java
>
>
> If Stomp client crashes (or disconnects unexpectedly) when there are unconsumed messages in the broker, the subscriptions are not removed from the broker and some phantom consumer is still consuming messages. If you connect other client, it receives only half messages (other half messages goes to that phantom consumer still left afrter client disconnect). There are no error logs in activemq logs. We are using stomp client, whith client acknowledge mode, so on broker restart, all messages are delivered properly. You can also see in jmx console, that subscription still exists whithout any connection left.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira