[QFJ-866] Initiator session timer with SSL enabled Created: 02/Nov/15  Updated: 23/Jun/16  Resolved: 23/Dec/15

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.6.0, 1.6.1
Fix Version/s: 1.6.2

Type: Bug Priority: Default
Reporter: Guido Medina Assignee: Guido Medina
Resolution: Fixed Votes: 0
Labels: None
Environment:

Debian 7


Issue Links:
Duplicate
is duplicated by QFJ-850 QuickFix/J stop to reconnect Closed
Relates
is related to QFJ-868 IoSessionInitiator can't reconnect th... Closed
is related to QFJ-895 Reconnecting initiator does not work ... Closed

 Description   

It seems to be an issue where the weekly session for a QuickFixJ initiator is not starting properly, I have several connections as initiator with no SSL and they all start find, I disconnect my sessions every Friday at 22:00 and start them again every Sunday at 21:00, all of them show the "Session not current" message (a) in the log and all of them except the one with SSL show later the log information about the session being started (b)

Sample logs:
a) 01-11-15 21:00:00 INFO q.event - FIX.4.4:...>...: Session state is not current; resetting FIX.4.4:01-11-15 21:00:00 INFO q.event - ...>...: Session state is not current; resetting FIX.4.4:...>...>...
b) 01-11-15 21:00:00 INFO q.m.i.InitiatorIoHandler - MINA session created for ...->...: local=/...:..., class org.apache.mina.transport.socket.nio.NioSocketSession, remote=/...:...

Log B is not happening for the connection with SSL so I'm not sure what's going on with the connection, it seems that for weekly sessions the SSL connection is not closing correctly making the timer hit a sort of a lock where it cannot get out? no other error is reporting.

Usually when a connection is down for a network issue it is retried except for this particular case of weekly reconnection.



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

Could you maybe take a stack dump of the process to check if there really is a lock of some kind? Does the connection come up after that (without resetting the session) or does it just hang there?

Comment by Guido Medina [ 20/Nov/15 ]

Hi Christoph,

The connection is hangs there, no other log happens, no error or anything so if you ask me I think it is either a dead lock (or unreachable condition) or some stall state within the SSL connector, I'll try to get a threads dump next week. It is not a hard lock in that once you stop and start the session it continues without any issue but now that you mention it I don't know if any other thread is stuck for ever so I'll definitely have to get a threads dump when the problem happens and then reset the session and see if such thread is still alive.

Comment by Guido Medina [ 20/Nov/15 ]

Another thing that I noticed 2 days ago is that when the connection cannot be started for SSL, it is not retried, I was adding a new connector that 1st was configured with SSL then it was changed to non-SSL and retries while network issues were present were happening only for non-SSL.

Comment by Christoph John [ 20/Nov/15 ]

Sounds a little like QFJ-868 but there is no mentioning of SSL.

Comment by Guido Medina [ 20/Nov/15 ]

Hmm, I think I have seen 868 issue now that I think about it, I wasn't paying too much attention so I automatically associated it with SSL maybe there is something with SSL that makes the issue "more" reproduce-able.

Comment by Christoph John [ 27/Nov/15 ]

Just realised there already was QFJ-850 for the same problem.

Comment by Guido Medina [ 18/Dec/15 ]

Look at pull request #50, it might fix the issue, mina core 2.0.10 released with some interesting bugs fixed and 3 of them SSL related.

Generated at Mon Apr 29 06:30:10 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.