[QFJ-868] IoSessionInitiator can't reconnect the disconnected session Created: 13/Nov/15  Updated: 17/Aug/16  Resolved: 17/Aug/16

Status: Closed
Project: QuickFIX/J
Component/s: Networking
Affects Version/s: 1.6.1
Fix Version/s: 1.6.3

Type: Bug Priority: Critical
Reporter: Shen liang Assignee: Guido Medina
Resolution: Duplicate Votes: 3
Labels: QuickfixJ, Reconnect, session

Issue Links:
Duplicate
duplicates QFJ-895 Reconnecting initiator does not work ... Closed
Relates
relates to QFJ-866 Initiator session timer with SSL enabled Closed

 Description   

The reconnection has a check shouldReconnect(). The function rely on the flag "!ioSession.isConnected()". But when the Session object disconnect its connection by

responder.disconnect();
setResponder(null);

The disconnect() itself will cause the close future set "closing = true". So there is a gap. Session object believe its connection is closed. While because of some reason the close isn't done, just be marked. So the background reconnection process will be fooled and won't be able to rebuild the connection. The Session timeout check routine will also just skip check since its responder is null by this check

// Return if we are not connected
if (!hasResponder())

{ return; }

The effect is the connection won't be back after the following exception log

Disconnecting: Socket exception : java.io.IOException: Connection reset by peer



 Comments   
Comment by Christoph John [ 20/Nov/15 ]

Hmm, I found several instances in our log files where the connection has been re-established after such an IOException. Will have to check.

Comment by Guido Medina [ 18/Dec/15 ]

Look at Github pull request #19

Comment by Guido Medina [ 18/Dec/15 ]

Sorry I meant #50

Comment by Christoph John [ 18/Dec/15 ]

Yes, you are referring to https://issues.apache.org/jira/browse/DIRMINA-995
The issue title says that it only appears with proxy, but further down the comments it seems it can also be triggered without proxy. Yeah, may very well be the problem.
Thank you.

Comment by Dan Corneanu [ 16/Aug/16 ]

Is this issue really solved in 1.6.2?
I am using

  • mina-*-2.0.13
  • quickfixj-*-1.6.2

and I can reliably reproduce this issue by enabling and disabling some firewall rules.

My session does use SSL

SocketUseSSL=Y
Comment by Christoph John [ 17/Aug/16 ]

Hi Dan,

no, it's not. But it is solved by QFJ-895. This is available in 1.6.3-SNAPSHOT and 1.7.0-SNAPSHOT.

Cheers,
Chris.

Generated at Sun May 05 12:19:27 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.