You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by AlexP <ap...@standardset.com> on 2013/11/14 18:35:22 UTC

Apollo 1.6 multiple connected/disconnected messages while using Stomp

We are using Stomp to connect and send messages to Apollo.  While we only
establish a single connection and send all our messages on it, we see quite 
few connected/disconnected messages.

Here is how we defined our connector we use for stomp:

<connector id="tcp" bind="tcp://0.0.0.0:61613" connection_limit="2000"
send_buffer_size="2048"/>


Every time we use Stomp we see these messages on the Apollo.  I know we are
not creating new connections, so I am not sure why this log has so many
connected/disconnected messages.  We are debugging some "dropped connection"
issues with our connection to Apollo via Stomp and that's why we are looking
around at various logs.

Any ideas why there would be so many connected/disconnected events for every
Stomp interaction?

2013-11-14 08:08:27,474 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51740
2013-11-14 08:08:27,475 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51740
2013-11-14 08:08:27,478 disconnected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51740
2013-11-14 08:08:27,479 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51741
2013-11-14 08:08:27,479 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51741
2013-11-14 08:08:27,481 disconnected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51741
2013-11-14 08:09:01,763 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51811
2013-11-14 08:09:01,763 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51811
2013-11-14 08:09:01,766 disconnected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51811
2013-11-14 08:09:01,984 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51815
2013-11-14 08:09:01,985 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51815
2013-11-14 08:09:01,987 disconnected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51815
2013-11-14 08:09:01,988 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51816
2013-11-14 08:09:01,988 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51816
2013-11-14 08:09:01,990 disconnected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51816
2013-11-14 08:09:02,044 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51817
2013-11-14 08:09:02,045 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51817
2013-11-14 08:09:02,048 disconnected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51817
2013-11-14 08:09:24,972 connected: local:/192.168.115.237:61613,
remote:/192.168.115.228:51892



--
View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apollo 1.6 multiple connected/disconnected messages while using Stomp

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Client violated the spec.  The server terminating the offending
client's connection does not see like a problem to me.

On Sun, Nov 24, 2013 at 11:56 AM, AlexP <ap...@standardset.com> wrote:
> Does anyone have any idea why we would get a disconnect after trying to
> un-subscribe an invalid subscription via Stomp?
>
> I'll try to dig into it a bit further next week.
>
> Thanks.
> -AP_
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484p4674793.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Hiram Chirino

Engineering | Red Hat, Inc.

hchirino@redhat.com | fusesource.com | redhat.com

skype: hiramchirino | twitter: @hiramchirino

blog: Hiram Chirino's Bit Mojo

Re: Apollo 1.6 multiple connected/disconnected messages while using Stomp

Posted by AlexP <ap...@standardset.com>.
Does anyone have any idea why we would get a disconnect after trying to
un-subscribe an invalid subscription via Stomp?  

I'll try to dig into it a bit further next week.

Thanks.
-AP_



--
View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484p4674793.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apollo 1.6 multiple connected/disconnected messages while using Stomp

Posted by AlexP <ap...@standardset.com>.
Dos anyone have any idea why we would get a disconnect after trying to
un-subscribe and invalid subscription via Stomp?

Thanks.
-AP_



--
View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484p4674792.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apollo 1.6 multiple connected/disconnected messages while using Stomp

Posted by AlexP <ap...@standardset.com>.
Actually, we get an ERROR frame, however, after that we seem to get a
disconnect.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484p4674590.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apollo 1.6 multiple connected/disconnected messages while using Stomp

Posted by AlexP <ap...@standardset.com>.
After some debugging, we discovered that Apollo 1.6 Stomp implementation
seems to be closing a Stomp connection on an un-subscribe of an invalid
subscription.  

Here is the sample log:

2013-11-14 18:45:36,072 STOMP connection '/127.0.0.1:38038' error: The
subscription '2' not found.
2013-11-14 18:45:41,083 disconnected: local:/127.0.0.1:61613,
remote:/127.0.0.1:38038

2013-11-14 18:46:03,034 STOMP connection '/127.0.0.1:38039' error: The
subscription '0' not found.
2013-11-14 18:46:08,040 disconnected: local:/127.0.0.1:61613,
remote:/127.0.0.1:38039

We corrected our code which was indeed trying to un-subscribe invalid
subscriptions so this issue is not occurring, however, I am wondering if an
ERROR frame should have been sent instead of a disconnect?

Thanks.
-AP_



--
View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484p4674512.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apollo 1.6 multiple connected/disconnected messages while using Stomp

Posted by AlexP <ap...@standardset.com>.
Sure,

We are using ReactPHP library's Stomp client, here:
https://github.com/reactphp/stomp/tree/master/src/React/Stomp

In the Factory, a physical socket is created and then consequently used: 
https://github.com/reactphp/stomp/blob/master/src/React/Stomp/Factory.php#L53

After the Factory creates the physical connection, the streams are assigned
into the Client:
https://github.com/reactphp/stomp/blob/master/src/React/Stomp/Factory.php#L46

So, I don't think the client is physically connecting and reConnecting on
every request.  As I mentioned, we are tracking strange disconnect issues
with the Client->Apollo so we have been tracing the connection logs to see
if we can spot a pattern or any indication of what's going on.

Thanks.
-AP_



--
View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484p4674491.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apollo 1.6 multiple connected/disconnected messages while using Stomp

Posted by Christian Posta <ch...@gmail.com>.
Any chance you can post your client code? What stomp lib are you using?

On Thu, Nov 14, 2013 at 9:35 AM, AlexP <ap...@standardset.com> wrote:
> We are using Stomp to connect and send messages to Apollo.  While we only
> establish a single connection and send all our messages on it, we see quite
> few connected/disconnected messages.
>
> Here is how we defined our connector we use for stomp:
>
> <connector id="tcp" bind="tcp://0.0.0.0:61613" connection_limit="2000"
> send_buffer_size="2048"/>
>
>
> Every time we use Stomp we see these messages on the Apollo.  I know we are
> not creating new connections, so I am not sure why this log has so many
> connected/disconnected messages.  We are debugging some "dropped connection"
> issues with our connection to Apollo via Stomp and that's why we are looking
> around at various logs.
>
> Any ideas why there would be so many connected/disconnected events for every
> Stomp interaction?
>
> 2013-11-14 08:08:27,474 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51740
> 2013-11-14 08:08:27,475 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51740
> 2013-11-14 08:08:27,478 disconnected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51740
> 2013-11-14 08:08:27,479 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51741
> 2013-11-14 08:08:27,479 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51741
> 2013-11-14 08:08:27,481 disconnected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51741
> 2013-11-14 08:09:01,763 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51811
> 2013-11-14 08:09:01,763 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51811
> 2013-11-14 08:09:01,766 disconnected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51811
> 2013-11-14 08:09:01,984 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51815
> 2013-11-14 08:09:01,985 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51815
> 2013-11-14 08:09:01,987 disconnected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51815
> 2013-11-14 08:09:01,988 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51816
> 2013-11-14 08:09:01,988 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51816
> 2013-11-14 08:09:01,990 disconnected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51816
> 2013-11-14 08:09:02,044 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51817
> 2013-11-14 08:09:02,045 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51817
> 2013-11-14 08:09:02,048 disconnected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51817
> 2013-11-14 08:09:24,972 connected: local:/192.168.115.237:61613,
> remote:/192.168.115.228:51892
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-1-6-multiple-connected-disconnected-messages-while-using-Stomp-tp4674484.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta