Disconnecting Due To First message not login

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Disconnecting Due To First message not login

Dermot
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi Guys,

I've got a strange one here I'm hoping you might be able to help with. I've been doing some testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges heartbeats and then disconnects due to test request timeout. The broker tells me it's a problem on my side because "first message is not LOGIN". He also says I'm connecting twice (which I can't see is possible).

I've put together the attached file which shows what's happening. Blue rows are my outgoing FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events and the yellow rows are from the broker's log which he has sent me and I've spliced in there. Could you please take a look? Start from the bottom - this is where I disconnected,

[Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log entry given the session has already exchanged sequence requests and heartbeats. One thing that may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to reply to. Please let me know if you have any ideas.

Thanks!
Dermot

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers

totalfixlogs.xlsx (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Fw: Disconnecting Due To First message not login

Dermot
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi Guys, Below is one I posted a month ago. Understand you're probably very busy but if you could take a look I'd appreciate it. You may have seen something similar before.

Thanks!
Dermot

----- Forwarded Message -----
From: "[hidden email]" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Date: 2017/5/11, Thu 04:17
Subject: [Quickfix-developers] Disconnecting Due To First message not login

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi Guys,

I've got a strange one here I'm hoping you might be able to help with. I've been doing some testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges heartbeats and then disconnects due to test request timeout. The broker tells me it's a problem on my side because "first message is not LOGIN". He also says I'm connecting twice (which I can't see is possible).

I've put together the attached file which shows what's happening. Blue rows are my outgoing FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events and the yellow rows are from the broker's log which he has sent me and I've spliced in there. Could you please take a look? Start from the bottom - this is where I disconnected,

[Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log entry given the session has already exchanged sequence requests and heartbeats. One thing that may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to reply to. Please let me know if you have any ideas.

Thanks!
Dermot

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers

totalfixlogs.xlsx (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Disconnecting Due To First message not login

QuickFIX - Dev mailing list
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Looks to me like a timeout on the network level. Then the other side thinks the connection is still
up and sends a test request while your side considers the connection broken and sends a new Logon
which the other side of course ignores since the session is still working.

Chris.


On 14/06/17 09:21, [hidden email] wrote:

> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
> Hi Guys, Below is one I posted a month ago. Understand you're probably very busy but if you could
> take a look I'd appreciate it. You may have seen something similar before.
>
> Thanks!
> Dermot
>
>     ----- Forwarded Message -----
>     *From:* "[hidden email]" <[hidden email]>
>     *To:* "[hidden email]" <[hidden email]>
>     *Date:* 2017/5/11, Thu 04:17
>     *Subject:* [Quickfix-developers] Disconnecting Due To First message not login
>
>     QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
>     Hi Guys,
>
>     I've got a strange one here I'm hoping you might be able to help with. I've been doing some
>     testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN
>     connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges
>     heartbeats and then disconnects due to test request timeout. The broker tells me it's a
>     problem on my side because "first message is not LOGIN". He also says I'm connecting twice
>     (which I can't see is possible).
>
>     I've put together the attached file which shows what's happening. Blue rows are my outgoing
>     FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events
>     and the yellow rows are from the broker's log which he has sent me and I've spliced in there.
>     Could you please take a look? Start from the bottom - this is where I disconnected,
>
>     [Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log
>     entry given the session has already exchanged sequence requests and heartbeats. One thing that
>     may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to
>     reply to. Please let me know if you have any ideas.
>
>     Thanks!
>     Dermot
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Quickfix-developers mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
>

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
       


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Disconnecting Due To First message not login

Michael C. Starkie
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Do you have a network at work to play with? Perhaps you can write a simple dummy Acceptor in Java that accepts your apps connection from a different host on the same network. How does your application behave when you disconnect and reconnect it's LAN connection? If it recovers than you have something to show NetOps.
On Tue, Jun 20, 2017 at 6:26 AM Christoph John via Quickfix-developers <[hidden email]> wrote:
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Looks to me like a timeout on the network level. Then the other side thinks the connection is still
up and sends a test request while your side considers the connection broken and sends a new Logon
which the other side of course ignores since the session is still working.

Chris.


On 14/06/17 09:21, [hidden email] wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
> Hi Guys, Below is one I posted a month ago. Understand you're probably very busy but if you could
> take a look I'd appreciate it. You may have seen something similar before.
>
> Thanks!
> Dermot
>
>     ----- Forwarded Message -----
>     *From:* "[hidden email]" <[hidden email]>
>     *To:* "[hidden email]" <[hidden email]>
>     *Date:* 2017/5/11, Thu 04:17
>     *Subject:* [Quickfix-developers] Disconnecting Due To First message not login
>
>     QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
>     Hi Guys,
>
>     I've got a strange one here I'm hoping you might be able to help with. I've been doing some
>     testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN
>     connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges
>     heartbeats and then disconnects due to test request timeout. The broker tells me it's a
>     problem on my side because "first message is not LOGIN". He also says I'm connecting twice
>     (which I can't see is possible).
>
>     I've put together the attached file which shows what's happening. Blue rows are my outgoing
>     FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events
>     and the yellow rows are from the broker's log which he has sent me and I've spliced in there.
>     Could you please take a look? Start from the bottom - this is where I disconnected,
>
>     [Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log
>     entry given the session has already exchanged sequence requests and heartbeats. One thing that
>     may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to
>     reply to. Please let me know if you have any ideas.
>
>     Thanks!
>     Dermot
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Quickfix-developers mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
>

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]



http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Disconnecting Due To First message not login

Dermot
In reply to this post by QuickFIX - Dev mailing list
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi Chris,

Thanks a lot for getting back. So I just wanna look at your response in relation to the log spreadsheet (attaching again).

[sends a test request] - You're taking about row 43 here?  

[other side thinks the connection is still up]  - That would make sense because there is no mention of a disconnect in the broker's logs (Yellow).

[while your side considers the connection broken and sends a new Logon which the other side of course ignores since the session is still working.] - the thing here is that the broker doesn't seem to be ignoring it because they send a login response (row 36). And this new connection seems to be working fine until right after heartbeat exchange (rows 13,14). If the broker still things the connection is fine back in row 43 then wouldn't they reject a new connection request (row 40)?

Help much appreciated!

Thanks,
Dermot




----- Original Message -----
From: Christoph John via Quickfix-developers <[hidden email]>
To: "[hidden email]" <[hidden email]>
Date: 2017/6/20, Tue 19:03
Subject: Re: [Quickfix-developers] Fw: Disconnecting Due To First message not login

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Looks to me like a timeout on the network level. Then the other side thinks the connection is still
up and sends a test request while your side considers the connection broken and sends a new Logon
which the other side of course ignores since the session is still working.

Chris.


On 14/06/17 09:21, [hidden email] wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
> Hi Guys, Below is one I posted a month ago. Understand you're probably very busy but if you could
> take a look I'd appreciate it. You may have seen something similar before.
>
> Thanks!
> Dermot
>
>    ----- Forwarded Message -----
>    *From:* "[hidden email]" <[hidden email]>
>    *To:* "[hidden email]" <[hidden email]>
>    *Date:* 2017/5/11, Thu 04:17
>    *Subject:* [Quickfix-developers] Disconnecting Due To First message not login
>
>    QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
>    Hi Guys,
>
>    I've got a strange one here I'm hoping you might be able to help with. I've been doing some
>    testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN
>    connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges
>    heartbeats and then disconnects due to test request timeout. The broker tells me it's a
>    problem on my side because "first message is not LOGIN". He also says I'm connecting twice
>    (which I can't see is possible).
>
>    I've put together the attached file which shows what's happening. Blue rows are my outgoing
>    FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events
>    and the yellow rows are from the broker's log which he has sent me and I've spliced in there.
>    Could you please take a look? Start from the bottom - this is where I disconnected,
>
>    [Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log
>    entry given the session has already exchanged sequence requests and heartbeats. One thing that
>    may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to
>    reply to. Please let me know if you have any ideas.
>
>    Thanks!
>    Dermot
>
>    ------------------------------------------------------------------------------
>    Check out the vibrant tech community on one of the world's most
>    engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>    _______________________________________________
>    Quickfix-developers mailing list
>    [hidden email] <mailto:[hidden email]>
>    https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
>

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
   


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
   
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
    Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
   
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers

totalfixlogs.xlsx (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Disconnecting Due To First message not login

Dermot
In reply to this post by Michael C. Starkie
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi Michael,

Thank you. Good point and I've tried this using FIXimulator many times - always a clean recovery without any issue.

Regards,
Dermot

----- Original Message -----
From: Michael C. Starkie <[hidden email]>
To: [hidden email]; "[hidden email]" <[hidden email]>
Date: 2017/6/20, Tue 20:06
Subject: Re: [Quickfix-developers] Fw: Disconnecting Due To First message not login

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Do you have a network at work to play with? Perhaps you can write a simple dummy Acceptor in Java that accepts your apps connection from a different host on the same network. How does your application behave when you disconnect and reconnect it's LAN connection? If it recovers than you have something to show NetOps.
On Tue, Jun 20, 2017 at 6:26 AM Christoph John via Quickfix-developers <[hidden email]> wrote:
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Looks to me like a timeout on the network level. Then the other side thinks the connection is still
up and sends a test request while your side considers the connection broken and sends a new Logon
which the other side of course ignores since the session is still working.

Chris.


On 14/06/17 09:21, [hidden email] wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
> Hi Guys, Below is one I posted a month ago. Understand you're probably very busy but if you could
> take a look I'd appreciate it. You may have seen something similar before.
>
> Thanks!
> Dermot
>
>     ----- Forwarded Message -----
>     *From:* "[hidden email]" <[hidden email]>
>     *To:* "[hidden email]" <[hidden email]>
>     *Date:* 2017/5/11, Thu 04:17
>     *Subject:* [Quickfix-developers] Disconnecting Due To First message not login
>
>     QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
>     Hi Guys,
>
>     I've got a strange one here I'm hoping you might be able to help with. I've been doing some
>     testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN
>     connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges
>     heartbeats and then disconnects due to test request timeout. The broker tells me it's a
>     problem on my side because "first message is not LOGIN". He also says I'm connecting twice
>     (which I can't see is possible).
>
>     I've put together the attached file which shows what's happening. Blue rows are my outgoing
>     FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events
>     and the yellow rows are from the broker's log which he has sent me and I've spliced in there.
>     Could you please take a look? Start from the bottom - this is where I disconnected,
>
>     [Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log
>     entry given the session has already exchanged sequence requests and heartbeats. One thing that
>     may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to
>     reply to. Please let me know if you have any ideas.
>
>     Thanks!
>     Dermot
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Quickfix-developers mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
>

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]



http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Disconnecting Due To First message not login

QuickFIX - Dev mailing list
In reply to this post by Dermot
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi Dermot,

I did not look at the spreadsheet but only read what you were writing in the mail. :)

If the broker still things the connection is fine back in row 43 then wouldn't they reject a new connection request (row 40)?
Between row 43 and 40 are 13 seconds. I assume the broker considered the connection broken somewhere during that time frame. But only guessing, though. ;)

Cheers,
Chris.



On 23/06/17 10:44, [hidden email] wrote:
Hi Chris,

Thanks a lot for getting back. So I just wanna look at your response in relation to the log spreadsheet (attaching again).

[sends a test request] - You're taking about row 43 here?  

[other side thinks the connection is still up]  - That would make sense because there is no mention of a disconnect in the broker's logs (Yellow).

[while your side considers the connection broken and sends a new Logon which the other side of course ignores since the session is still working.] - the thing here is that the broker doesn't seem to be ignoring it because they send a login response (row 36). And this new connection seems to be working fine until right after heartbeat exchange (rows 13,14). If the broker still things the connection is fine back in row 43 then wouldn't they reject a new connection request (row 40)?

Help much appreciated!

Thanks,
Dermot




----- Original Message -----
From: Christoph John via Quickfix-developers [hidden email]
To: [hidden email] [hidden email]
Date: 2017/6/20, Tue 19:03
Subject: Re: [Quickfix-developers] Fw: Disconnecting Due To First message not login

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Looks to me like a timeout on the network level. Then the other side thinks the connection is still
up and sends a test request while your side considers the connection broken and sends a new Logon
which the other side of course ignores since the session is still working.

Chris.


On 14/06/17 09:21, [hidden email] wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
> Hi Guys, Below is one I posted a month ago. Understand you're probably very busy but if you could
> take a look I'd appreciate it. You may have seen something similar before.
>
> Thanks!
> Dermot
>
>    ----- Forwarded Message -----
>    *From:* "[hidden email]" <[hidden email]>
>    *To:* "[hidden email]" <[hidden email]>
>    *Date:* 2017/5/11, Thu 04:17
>    *Subject:* [Quickfix-developers] Disconnecting Due To First message not login
>
>    QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
>    Hi Guys,
>
>    I've got a strange one here I'm hoping you might be able to help with. I've been doing some
>    testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN
>    connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges
>    heartbeats and then disconnects due to test request timeout. The broker tells me it's a
>    problem on my side because "first message is not LOGIN". He also says I'm connecting twice
>    (which I can't see is possible).
>
>    I've put together the attached file which shows what's happening. Blue rows are my outgoing
>    FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events
>    and the yellow rows are from the broker's log which he has sent me and I've spliced in there.
>    Could you please take a look? Start from the bottom - this is where I disconnected,
>
>    [Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log
>    entry given the session has already exchanged sequence requests and heartbeats. One thing that
>    may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to
>    reply to. Please let me know if you have any ideas.
>
>    Thanks!
>    Dermot
>
>    ------------------------------------------------------------------------------
>    Check out the vibrant tech community on one of the world's most
>    engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>    _______________________________________________
>    Quickfix-developers mailing list
>    [hidden email] <mailto:[hidden email]>
>    https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
>

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
   


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
   
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
    Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
   
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers



--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:Christoph.John@...



http://www.macd.com


MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
 Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald


take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Disconnecting Due To First message not login

Dermot
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Ha.. Sure understood Chris. Thanks!

----- Original Message -----
From: Christoph John <[hidden email]>
To: [hidden email]; "[hidden email]" <[hidden email]>
Date: 2017/6/23, Fri 21:15
Subject: Re: [Quickfix-developers] Fw: Disconnecting Due To First message not login

Hi Dermot,

I did not look at the spreadsheet but only read what you were writing in the mail. :)

If the broker still things the connection is fine back in row 43 then wouldn't they reject a new connection request (row 40)?
Between row 43 and 40 are 13 seconds. I assume the broker considered the connection broken somewhere during that time frame. But only guessing, though. ;)

Cheers,
Chris.



On 23/06/17 10:44, [hidden email] wrote:
Hi Chris,

Thanks a lot for getting back. So I just wanna look at your response in relation to the log spreadsheet (attaching again).

[sends a test request] - You're taking about row 43 here?  

[other side thinks the connection is stillup]  - That would make sense because there is no mention of a disconnect in the broker's logs (Yellow). 

[while your side considers the connection broken and sends a new Logonwhich the other side of course ignores since the session is still working.] - the thing here is that the broker doesn't seem to be ignoring it because they send a login response (row 36). And this new connection seems to be working fine until right after heartbeat exchange (rows 13,14). If the broker still things the connection is fine back in row 43 then wouldn't they reject a new connection request (row 40)? 

Help much appreciated!

Thanks,
Dermot




----- Original Message -----
From: Christoph John via Quickfix-developers [hidden email]
To: [hidden email] [hidden email]
Date: 2017/6/20, Tue 19:03
Subject: Re: [Quickfix-developers] Fw: Disconnecting Due To First message not login

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Looks to me like a timeout on the network level. Then the other side thinks the connection is still
up and sends a test request while your side considers the connection broken and sends a new Logon
which the other side of course ignores since the session is still working.

Chris.


On 14/06/17 09:21, [hidden email] wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
> Hi Guys, Below is one I posted a month ago. Understand you're probably very busy but if you could
> take a look I'd appreciate it. You may have seen something similar before.
>
> Thanks!
> Dermot
>
>    ----- Forwarded Message -----
>    *From:* "[hidden email]" <[hidden email]>
>    *To:* "[hidden email]" <[hidden email]>
>    *Date:* 2017/5/11, Thu 04:17
>    *Subject:* [Quickfix-developers] Disconnecting Due To First message not login
>
>    QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/
>
>
>    Hi Guys,
>
>    I've got a strange one here I'm hoping you might be able to help with. I've been doing some
>    testing with my broker, fail scenarios, specifically a "dirty disconnect" [disabling the LAN
>    connection] and then letting QuickFix handle the reconnect. It reconnects correctly, exchanges
>    heartbeats and then disconnects due to test request timeout. The broker tells me it's a
>    problem on my side because "first message is not LOGIN". He also says I'm connecting twice
>    (which I can't see is possible).
>
>    I've put together the attached file which shows what's happening. Blue rows are my outgoing
>    FIX messages, orange rows are the broker's incoming FIX messages, white are quickfix events
>    and the yellow rows are from the broker's log which he has sent me and I've spliced in there.
>    Could you please take a look? Start from the bottom - this is where I disconnected,
>
>    [Disconnecting Connection ID - 0 Due To First message not login] seems like a strange log
>    entry given the session has already exchanged sequence requests and heartbeats. One thing that
>    may be related.. the broker sends a TEST REQUEST at 14:58:30.341 which my side doesn't seem to
>    reply to. Please let me know if you have any ideas.
>
>    Thanks!
>    Dermot
>
>    ------------------------------------------------------------------------------
>    Check out the vibrant tech community on one of the world's most
>    engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>    _______________________________________________
>    Quickfix-developers mailing list
>    [hidden email] <mailto:[hidden email]>
>    https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
>

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
   


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
   
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
    Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
   
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers



--
Christoph John
Development & Support
Direct: +49 241 557080-28
[hidden email]



http://www.macd.com


MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
 Aachen District Court: HRB 8151
VAT-ID: DE 813 021 663

Managing Director: George Macdonald


take care of the environment - print only if necessary



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

QuickFix on VS2015

Dermot
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi All, Can someone please tell me the position on QuickFix on VS2015. Is it supported?

I upgraded the VS2012 solution file to VS2015 and got it to compile by changing one line of code in Utility.cpp, line 399:-

OLD: result = _beginthreadex( NULL, 0, &func, var, 0, &id );
NEW: result = _beginthreadex( NULL, 0, (unsigned(__stdcall*)(void*)) &func, var, 0, &id );

Then compiled and ran the tradeclient example. Creating the initiator object took about 30 seconds (it was pretty instantaneous on VS2010) and then it became unstable after the call to initiator.start() - it crashed on the subsequent call to std::cout in application.run().

Any ideas?

Thanks,
Dermot

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: QuickFix on VS2015

K. Frank
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Hello Dermot!

I think you may be running into a known (sem-) bug.  See comments,
in line, below.

On Sat, Jul 1, 2017 at 3:33 AM,  <[hidden email]> wrote:
>
> Hi All, Can someone please tell me the position on QuickFix on VS2015. Is it supported?

I cannot speak as to whether QuickFIX is supported on VS2015.

> I upgraded the VS2012 solution file to VS2015 and got it to compile by changing one line of code in Utility.cpp, line 399:-

I think that there is an outright bug in the windows version of QuickFIX,
that, for whatever reason, was tolerated by some versions of VS, perhaps
VS2012.  Since I believe that it's a bug, then I wouldn't be surprised to
find out that it is no longer tolerated by newer versions of VS, for example,
VS2015.

> OLD: result = _beginthreadex( NULL, 0, &func, var, 0, &id );
> NEW: result = _beginthreadex( NULL, 0, (unsigned(__stdcall*)(void*)) &func, var, 0, &id );

Speaking from memory, "func" in an actual pointer-to-function (not the name
of a function which would then "decay" to pointer-to-function).  So &func is a
pointer-to-pointer-to-function and is therefore the wrong type for the third
argument of _beginthreadex.  (The third argument should be pointer-to-function.)

If I am right that your cast is a microsoftian version of
pointer-to-function, then
your cast is completely bogus:  You pass in the address of a location in memory
that holds the address of a function, but you lie to the compiler, and
tell it that
you are passing in the address of a function.

> Then compiled and ran the tradeclient example. Creating the initiator object took about 30 seconds (it was pretty instantaneous on VS2010) and then it became unstable after the call to initiator.start() - it crashed on the subsequent call to std::cout in application.run().

I'm not at all surprised that you get a crash.  I imagine that your
spawned thread
tries to run "random data" on the stack or heap somewhere as if it
were a function,
so you get "undefined behavior" / crash /.corruption.

> Any ideas?

I believe that the correct fix would be to remove the "&" from "&func", that is,
instead of using your cast, replace

   result = _beginthreadex( NULL, 0, &func, var, 0, &id );

with

   result = _beginthreadex( NULL, 0, func, var, 0, &id );

This worked for me some years ago with an older version of QuickFIX using
mingw_w64 instead of VS.

There are two old threads about this issue:

   https://sourceforge.net/p/quickfix/mailman/quickfix-developers/thread/CANL%3DBToQ%2BwdfkL-XwBO-pX8Wb%3DBFpmxxPD80kWNH50d7tF0SOg%40mail.gmail.com/#msg30386701

   https://sourceforge.net/p/quickfix/mailman/message/35810081/

The short story is that I think "&func" is a bug, my fix worked for me
using mingw_w64,
my fix seems to have worked for someone using "visual studio community
2015", the
bug version ("&func") worked for Mike Gatny on a 32-bit VS version
back in 2013, the
bug is not present in the linux version of QuickFIX, and I've never
understood why the
"&func" version ever compiled on windows (although I don't doubt that it did).

Unless I'm completely confused about what seems to be straightforward
c++, this really
is a bug in the windows version of QuickFIX and it ought to be fixed
in the QuickFIX source.

> Thanks,
> Dermot


Happy Hacking!


K. Frank

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: QuickFix on VS2015

Dermot
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi Frank,

This is gold dust.. thanks so much! I had a horrible feeling I'd need to roll back the VS version but your fix worked a charm and saved me a lot of time and stress.

Thanks Again!
Dermot

----- Original Message -----
From: K. Frank <[hidden email]>
To: "[hidden email]" <[hidden email]>
Date: 2017/7/2, Sun 01:10
Subject: Re: [Quickfix-developers] QuickFix on VS2015

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Hello Dermot!

I think you may be running into a known (sem-) bug.  See comments,
in line, below.

On Sat, Jul 1, 2017 at 3:33 AM,  <[hidden email]> wrote:
>
> Hi All, Can someone please tell me the position on QuickFix on VS2015. Is it supported?

I cannot speak as to whether QuickFIX is supported on VS2015.

> I upgraded the VS2012 solution file to VS2015 and got it to compile by changing one line of code in Utility.cpp, line 399:-

I think that there is an outright bug in the windows version of QuickFIX,
that, for whatever reason, was tolerated by some versions of VS, perhaps
VS2012.  Since I believe that it's a bug, then I wouldn't be surprised to
find out that it is no longer tolerated by newer versions of VS, for example,
VS2015.

> OLD: result = _beginthreadex( NULL, 0, &func, var, 0, &id );
> NEW: result = _beginthreadex( NULL, 0, (unsigned(__stdcall*)(void*)) &func, var, 0, &id );

Speaking from memory, "func" in an actual pointer-to-function (not the name
of a function which would then "decay" to pointer-to-function).  So &func is a
pointer-to-pointer-to-function and is therefore the wrong type for the third
argument of _beginthreadex.  (The third argument should be pointer-to-function.)

If I am right that your cast is a microsoftian version of
pointer-to-function, then
your cast is completely bogus:  You pass in the address of a location in memory
that holds the address of a function, but you lie to the compiler, and
tell it that
you are passing in the address of a function.

> Then compiled and ran the tradeclient example. Creating the initiator object took about 30 seconds (it was pretty instantaneous on VS2010) and then it became unstable after the call to initiator.start() - it crashed on the subsequent call to std::cout in application.run().

I'm not at all surprised that you get a crash.  I imagine that your
spawned thread
tries to run "random data" on the stack or heap somewhere as if it
were a function,
so you get "undefined behavior" / crash /.corruption.

> Any ideas?

I believe that the correct fix would be to remove the "&" from "&func", that is,
instead of using your cast, replace

  result = _beginthreadex( NULL, 0, &func, var, 0, &id );

with

  result = _beginthreadex( NULL, 0, func, var, 0, &id );

This worked for me some years ago with an older version of QuickFIX using
mingw_w64 instead of VS.

There are two old threads about this issue:

  https://sourceforge.net/p/quickfix/mailman/quickfix-developers/thread/CANL%3DBToQ%2BwdfkL-XwBO-pX8Wb%3DBFpmxxPD80kWNH50d7tF0SOg%40mail.gmail.com/#msg30386701

  https://sourceforge.net/p/quickfix/mailman/message/35810081/

The short story is that I think "&func" is a bug, my fix worked for me
using mingw_w64,
my fix seems to have worked for someone using "visual studio community
2015", the
bug version ("&func") worked for Mike Gatny on a 32-bit VS version
back in 2013, the
bug is not present in the linux version of QuickFIX, and I've never
understood why the
"&func" version ever compiled on windows (although I don't doubt that it did).

Unless I'm completely confused about what seems to be straightforward
c++, this really
is a bug in the windows version of QuickFIX and it ought to be fixed
in the QuickFIX source.

> Thanks,
> Dermot


Happy Hacking!


K. Frank

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: QuickFix on VS2015

K. Frank
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

Hi Dermot!

Great that things worked out for you!

Hey, now that we have THREE "testers-in-the-wild" who have verified that

   1)  "&func" really is an issue in the windows code

   2)  "&func" --> "func" fixes it

perhaps the QuickFIX maintainers could apply this (minus) ONE
CHARACTER correction to the master code base, and get this issue
fixed for once and for all.


Happy Hacking!


K. Frank


On Sun, Jul 2, 2017 at 2:48 AM,  <[hidden email]> wrote:

> Hi Frank,
>
> This is gold dust.. thanks so much! I had a horrible feeling I'd need to
> roll back the VS version but your fix worked a charm and saved me a lot of
> time and stress.
>
> Thanks Again!
> Dermot
>
> ----- Original Message -----
> From: K. Frank <[hidden email]>
> To: "[hidden email]"
>
> Hello Dermot!
>
> I think you may be running into a known (sem-) bug.  See comments,
> in line, below.
> ...

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers