[QFJ-297] Logout message not received in fromAdmin event, during first failed logon attempt. Created: 25/Feb/08  Updated: 15/Nov/12  Resolved: 19/Aug/08

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.3.1
Fix Version/s: None

Type: Bug Priority: Default
Reporter: Dominic Cubitt Assignee: Unassigned
Resolution: Not a bug Votes: 0
Labels: None
Environment:

JDK 1.6, Windows, Java



 Description   

Using a quickfix initiator, logging on to another FIX gateway (for the first time), where the logon is rejected for some reason, while the target gateway sends a logout message with 58=The Reason, this is not passed to the fromAdmin method. The connection is simply dropped without any way for the client application to display the reason.

While the onLogout event is called, this of course does not contain the message and therefore no reason can be extracted. Only looking at the fix message logs and examining the fix message can one tell why the logon was rejected.

If a session is previously established, and the target gateway sends a logout message, in this case the message is received on the fromAdmin and the client can display the reason.



 Comments   
Comment by Steve Bate [ 17/Jun/08 ]

Can you be more specific about the scenario where this occurs? Generally, an incoming logout message should always be provided to the fromAdmin callback. Are you sure the counterparty wasn't just dropping the connection?

Comment by Dominic Cubitt [ 17/Jun/08 ]

Specifically, the scenario is logging on for the first time, where the logon is rejected for some reason that is detailed in the logout message in tag 58.

In this case, the fromAdmin callback is not called. The onLogon callback is called.

The response message is sent and can be viewed from logs, and indeed contains the logon rejection reason in tag 58.

This makes it impossible to programmatically display the logon rejection reason.

The counterparty is not just dropping the connection, as the logout message can be viewed in the logs.

Comment by Steve Bate [ 17/Jun/08 ]

I'm trying to determine why a logout message from a "first login" would handled any differently than a logout received for any other reason. Another possibility is that the logout message is not passing validation.

The normal sequence of methods handling the logout message is...

Session.next(message)
Session.nextLogout(message)
Session.verify(message, ...)
Session.fromCallback(..., message, ...)
Application.fromAdmin(message, ...)

The fromAdmin method should always called for a valid logout message. Do you see anything in your logs related to a failed message validation for the logout? Thanks.

Comment by Steve Bate [ 18/Jun/08 ]

Dominic, have you been able to review your log files for errors with the logout verification?

Comment by Dominic Cubitt [ 18/Jun/08 ]

Hi Steve, I have sent you a log file to your ...@quickfixj email address as I did not wish to post it on a public site. Hope this helps.

Comment by Paul-Henri Giraud [ 23/Jun/08 ]

We reproduce exactly the same issue. Thanks for your help.

Comment by Paul-Henri Giraud [ 23/Jun/08 ]

It seems that we do not get the fromAdmin callback when the logout is the result of a timeout:

[11:08:34][INFO][event] FIX.4.3:XXXX->YYYY: Timed out waiting for logon response
[11:08:34][INFO][event] FIX.4.3:XXXX->YYYY: Disconnecting
[11:08:34][INFO][fixInitiator] Session FIX.4.3:XXXX->YYYY logged out.
[11:08:34][INFO][event] FIX.4.3:ZZZZ->YYYY: Timed out waiting for logon response
[11:08:34][INFO][event] FIX.4.3:ZZZZ->YYYY: Disconnecting
[11:08:34][INFO][fixInitiator] Session FIX.4.3:ZZZZ->YYYY logged out.

The fromAdmin is correctly call when the logout is actually incomming from external:

[11:08:46][INFO][outgoing] FIX.4.3:XXXX->YYYY: 8=FIX.4.3 | 9=127 | 35=A | 34=29 | 49=XXXX | 52=20080623-09:08:46.534 | 56=YYYY | 98=0 | 108=30 | 553=btobxpte0130 | 554=_OvD4bPZdyWUi6A8eMBy2IQcQW$SEl | 10=188 |
[11:08:46][INFO][event] FIX.4.3:XXXX->YYYY: Initiated logon request
[11:08:46][INFO][outgoing] FIX.4.3:ZZZZ->YYYY: 8=FIX.4.3 | 9=127 | 35=A | 34=26 | 49=ZZZZ | 52=20080623-09:08:46.550 | 56=YYYY | 98=0 | 108=30 | 553=btobxpte0130 | 554=_OvD4bPZdyWUi6A8eMBy2IQcQW$SEl | 10=192 |
[11:08:46][INFO][event] FIX.4.3:ZZZZ->YYYY: Initiated logon request
[11:08:47][INFO][incoming] FIX.4.3:XXXX->YYYY: 8=FIX.4.3 | 9=81 | 35=5 | 49=YYYY | 56=XXXX | 34=7 | 52=20080623-09:08:39 | 58=Service Unavailable | 10=210 |
[11:08:47][INFO][incoming] FIX.4.3:ZZZZ->YYYY: 8=FIX.4.3 | 9=81 | 35=5 | 49=YYYY | 56=ZZZZ | 34=5 | 52=20080623-09:08:39 | 58=Service Unavailable | 10=217 |
[11:08:47][INFO][fixInitiator] ************** fromAdmin ******************
[11:08:47][INFO][event] FIX.4.3:ZZZZ->YYYY: Received logout request
[11:08:47][INFO][event] FIX.4.3:ZZZZ->YYYY: Disconnecting
[11:08:47][INFO][fixInitiator] Session FIX.4.3:ZZZZ->YYYY logged out.
[11:08:47][INFO][event] FIX.4.3:XXXX->YYYY: Disconnecting
[11:08:47][INFO][fixInitiator] Session FIX.4.3:XXXX->YYYY logged out.

Comment by Steve Bate [ 24/Jun/08 ]

The purpose of the fromAdmin callback is to provide administrative messages from counterparties to a local application. In the case of a logon timeout, there is no corresponding message from the counterparty. Therefore, there's no message to provide to fromAdmin. The onLogout callback is still invoked since it doesn't require a message.

Generated at Tue May 14 23:38:26 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.