{{Quickfixn}} Existing Connection Forcibly Closed

Ian Clements ian.clements at investmentsoftwareltd.com
Thu Sep 17 10:31:26 PDT 2015


Further to the issue of the connection being forcibly closed I have found we are now missing a significant number of messages when we manage to reconnect as it seems we get sequence resets that skip over messages even though we request them which is really messes things up.  I have included our QuickFix engine log if anyone can shed some light on what has gone wrong it would be greatly appreciated.  The messages we lost were sent during the session disconnect I have included some missing sequence numbers below but we are missing over 100 in total.  Probably my ignorance of FIX but I had assumed we should have recovered these messages when we reconnected and it looks like it is attempting to do that.

20078

22080

23074

24079

26088

27065




20150917-14:20:48.575 : Created session

20150917-14:20:48.584 : Connecting to xxx.xxx.xxx.xx on port xxxxx

20150917-14:20:50.268 : Connection succeeded

20150917-14:20:50.294 : Initiated logon request

20150917-14:20:50.429 : Received logon

20150917-14:27:32.281 : Session FIX.4.2:xxxxxxxxxxxxxxxxxxxxxxxxxxx disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host

   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)

   at QuickFix.SocketInitiatorThread.Read()

20150917-14:27:49.004 : Connecting to xxx.xxx.xxx.xx on port xxxxx

20150917-14:27:50.597 : Connection succeeded

20150917-14:27:50.598 : Initiated logon request

20150917-14:27:50.671 : Received logon

20150917-14:27:50.671 : MsgSeqNum too high, expecting 19768 but received 20464

20150917-14:27:50.673 : Sent ResendRequest FROM: 19768 TO: 0

20150917-14:27:50.680 : Got resend request from 2846 to 0

20150917-14:27:50.683 : Sent SequenceReset TO: 2849

20150917-14:27:50.749 : ResendRequest for messages FROM: 19768 TO: 0 has been satisfied.

20150917-14:27:50.750 : Received SequenceReset FROM: 19768 TO: 20466

20150917-14:28:13.200 : Session FIX.4.2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host

   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)

   at QuickFix.SocketInitiatorThread.Read()

20150917-14:28:49.073 : Connecting to xxx.xxx.xxx.xx on port xxxxx

20150917-14:28:51.039 : Connection succeeded

20150917-14:28:51.039 : Initiated logon request

20150917-14:28:51.157 : Received logon

20150917-14:28:51.157 : MsgSeqNum too high, expecting 21452 but received 22099

20150917-14:28:51.157 : Sent ResendRequest FROM: 21452 TO: 0

20150917-14:28:51.161 : MsgSeqNum too high, expecting 21452 but received 22100

20150917-14:28:51.161 : Already sent ResendRequest FROM: 21452 TO: 0.  Not sending another.

20150917-14:28:51.279 : ResendRequest for messages FROM: 21452 TO: 0 has been satisfied.

20150917-14:28:51.279 : Received SequenceReset FROM: 21452 TO: 22101

20150917-14:29:17.136 : Session FIX.4.2:xxxxxxxxxxxxxxxxxxxxxxxxxxxx disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host

   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)

   at QuickFix.SocketInitiatorThread.Read()

20150917-14:29:49.139 : Connecting to xxx.xxx.xxx.xx on port xxxxx

20150917-14:29:50.465 : Connection succeeded

20150917-14:29:50.465 : Initiated logon request

20150917-14:29:50.543 : Received logon

20150917-14:29:50.543 : MsgSeqNum too high, expecting 23055 but received 24855

20150917-14:29:50.543 : Sent ResendRequest FROM: 23055 TO: 0

20150917-14:29:50.551 : MsgSeqNum too high, expecting 23055 but received 24856

20150917-14:29:50.551 : Already sent ResendRequest FROM: 23055 TO: 0.  Not sending another.

20150917-14:29:50.617 : ResendRequest for messages FROM: 23055 TO: 0 has been satisfied.

20150917-14:29:50.617 : Received SequenceReset FROM: 23055 TO: 24857

20150917-14:30:15.978 : Session FIX.4.2:xxxxxxxxxxxxxxxxxxxxxxxxxxx disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host

   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)

   at QuickFix.SocketInitiatorThread.Read()


From: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Ian Clements
Sent: 17 September 2015 16:03
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com>
Subject: Re: {{Quickfixn}} Existing Connection Forcibly Closed

Running on my local development machine behind a firewall which connects via fibre to our DNS server which is off site in a data centre then out via another firewall (I think).

Could it be a firewalls killing it thinking it’s hostile traffic?

From: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Christopher Karpyszyn
Sent: 17 September 2015 15:59
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>>
Subject: Re: {{Quickfixn}} Existing Connection Forcibly Closed

It could be a network issue. What kind of environment is the application running from?

Chris
From: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Ian Clements
Sent: Thursday, September 17, 2015 10:49 AM
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>>
Subject: Re: {{Quickfixn}} Existing Connection Forcibly Closed

Thanks Grant.

That’s kind of what I figured but they didn’t seem so impressed when I implied it might be them - they said we were connecting to the best hardware which loads of people were connecting to and it was our fault!

From: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Grant Birchmeier
Sent: 17 September 2015 15:44
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>>
Subject: Re: {{Quickfixn}} Existing Connection Forcibly Closed

"An existing connection was forcibly closed by the remote host"

Basically, Bloomberg hung up on you.

The only way to find out why is to ask them.

​I mean, check your logs first to see if something looks weird, but otherwise reach out to Bloomberg's support.​


On Thu, Sep 17, 2015 at 9:34 AM, Ian Clements <ian.clements at investmentsoftwareltd.com<mailto:ian.clements at investmentsoftwareltd.com>> wrote:
Hi all,

I have an established connection to a Bloomberg FIX acceptor over SSL.  The problem is when I am doing fills for a large quantity of orders (1000 in this case with 10 fills per order) I am getting the following exception…

disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)
   at QuickFix.SocketInitiatorThread.Read()

QuickFix/N reconnects and resumes filling and after a few of these exceptions and reconnects all orders end up filled.  I was wondering what is causing this exception and how do I prevent it.

Any help would be really appreciated.

Many thanks,
Ian.

_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com



--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20150917/085aab8f/attachment-0002.htm>


More information about the Quickfixn mailing list