On 01/04/2019 22:33, Gordon Sim wrote:
On 01/04/2019 12:54 pm, Toralf Lund wrote:
On 28/03/2019 15:56, Toralf Lund wrote:

Hi,

I have another question related to my recent post about trying to re-establish lost connections. Recall that my system is set up without automatic reconnect, but may do a "manual reconnect" via

  qpid::Messaging connection(url);

  ...

  if(!connection.isOpen()) {
    connection.open();
  }

and that this is sometimes triggered by an "internal disconnect" accompanied by an exception with message "Failed to connect (reconnect disabled)".

Now, I just found that some of the reconnects are accompanied by a "Session detached by peer" exception. I'm struggling a bit to find out what exactly triggers this; the problems occur once every few hours at a remote site, and I can't just start or stop or update the software at any old time, so it's a bit hard to debug...

I just noticed that the broker log has something like

    2019-04-01 11:11:42 [Broker] error Channel exception: session-busy:
    Session already attached:
    anonymous.c9a1f4cf-7427-4e77-8870-e118b099c6da
(/work/build/rpmbuild/BUILD/msat-qpid-cpp-1.36/msat-qpid-cpp-1.36.0/src/qpid/broker/SessionManager.cpp:55)
    2019-04-01 11:11:46 [Protocol] error Connection
    qpid.10.31.193.215:5672-10.31.192.61:35954 timed out: closing

for most or all the reconnects. The first time-stamp seems to correspond to the connection open and "Session detached by peer" exception.

Perhaps this means the broker still thinks the old connection is open, even though the client considers it as lost? And maybe the attempt to re-establish/re-use the old session with the new connection fails as a result of that?

Correct. Does the broker log the loss of the connection, e.g. a timed out notice? If so how does the time of that compare to the session-busy error and to the client detecting the failed connection?

The broker also has a message saying "Connection ... timed out: closing". This occurs 4-5 seconds after the session-busy error, according to the timestamps.

- Toralf




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



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

Reply via email to