You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by trivedi_ravi13 <tr...@yahoo.co.in> on 2014/01/10 11:31:53 UTC

qpid::client::Connection::newSession() seems to be hanging

My application has multiple receivers & senders. It seems to be hanging
forever when calling function qpid::client::Connection::newSession(). It
occurs in the scenario when application disconnects ( due to n/w loss) &
reconnects to the broker again after sometime. I am trying to declare some
queues & create receiver on that after re-connection. Issue doesn't occur
always.  Is it a blocking function i.e waiting for ack or response from
broker ? I am using Qpid 0.12 Client APIs





--
View this message in context: http://qpid.2158936.n2.nabble.com/qpid-client-Connection-newSession-seems-to-be-hanging-tp7602520.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by Gordon Sim <gs...@redhat.com>.
On 01/10/2014 11:05 AM, trivedi_ravi13 wrote:
> It appears to me that client did not even send session.attach command to
> broker for the last queue.

Are you sure the connection and socket are still active?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by trivedi_ravi13 <tr...@yahoo.co.in>.
Thanks, that gave me clue..

I checked lsof output of my process before disconnecting to the broker &
after restarting the broker. Application should automatically reconnect to
the broker as per implementation. But it appears that it did not.

lsof command output shows same ESTABLISHED connection between client and
broker in bothe the cases. If the re connection happens the client's TCP
source port should have changed right ? 

TestApp 2611 root   27u  IPv4      14137           TCP
172.20.105.2:45093->172.20.100.10:5672 (ESTABLISHED)

But how come Application could not detect the broker loss ? All the
exceptions are handled. Other App using same code was able to detect the
failure.



--
View this message in context: http://qpid.2158936.n2.nabble.com/qpid-client-Connection-newSession-seems-to-be-hanging-tp7602520p7602532.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by Gordon Sim <gs...@redhat.com>.
On 01/10/2014 11:35 AM, trivedi_ravi13 wrote:
> Is there an alternative to SYNC newSession() ? can we use AsyncSession to
> declare queues and subscribe to it ? Do you advise to use AsyncSession here
> to fix this issue ?

If the attach request is not even being sent, then the issue is not in 
blocking for that to be confirmed, so making the call asynchronous will 
not help.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by trivedi_ravi13 <tr...@yahoo.co.in>.
Is there an alternative to SYNC newSession() ? can we use AsyncSession to
declare queues and subscribe to it ? Do you advise to use AsyncSession here
to fix this issue ? Debugging with GDB would take time and We need to have
fix ASAP.



--
View this message in context: http://qpid.2158936.n2.nabble.com/qpid-client-Connection-newSession-seems-to-be-hanging-tp7602520p7602529.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by trivedi_ravi13 <tr...@yahoo.co.in>.
Thank you for the response.

It appears to me that client did not even send session.attach command to
broker for the last queue. I could see following sequence of commands for my
previous receivers i.e before it hangs.

session.attach
session.attached session.command-point
session.request-timeout
session.timeout
session.command-point queue.declare
session.completed
exchange.bind
session.completed
message.subscribe

 



--
View this message in context: http://qpid.2158936.n2.nabble.com/qpid-client-Connection-newSession-seems-to-be-hanging-tp7602520p7602525.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by Gordon Sim <gs...@redhat.com>.
On 01/10/2014 10:45 AM, trivedi_ravi13 wrote:
> How can we identify in a packet capture that the broker replied successfully
> or not ?

Assuming you have the 0-10 dissector for wireshark, look for the 
session.attach and session-attached controls.

> Is there any other way to debug ?

Depending on how easily you can reproduce you could always try running 
under gdb.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by trivedi_ravi13 <tr...@yahoo.co.in>.
How can we identify in a packet capture that the broker replied successfully
or not ? Is there any other way to debug ? 



--
View this message in context: http://qpid.2158936.n2.nabble.com/qpid-client-Connection-newSession-seems-to-be-hanging-tp7602520p7602522.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid::client::Connection::newSession() seems to be hanging

Posted by Gordon Sim <gs...@redhat.com>.
On 01/10/2014 10:31 AM, trivedi_ravi13 wrote:
> My application has multiple receivers & senders. It seems to be hanging
> forever when calling function qpid::client::Connection::newSession(). It
> occurs in the scenario when application disconnects ( due to n/w loss) &
> reconnects to the broker again after sometime. I am trying to declare some
> queues & create receiver on that after re-connection. Issue doesn't occur
> always.  Is it a blocking function i.e waiting for ack or response from
> broker ?

Yes, it waits for the broker to confirm the attachment of the session.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org