<div dir="ltr"><p dir="ltr" style="font-size:12.8px">I have two sessions, called TRADE and TENS.</p><p dir="ltr" style="font-size:12.8px">TRADE uses SSL. TENS does not but connects via a VPN.</p><p dir="ltr" style="font-size:12.8px">When the config file defines TRADE followed by TENS, we get the following behaviour:</p><p dir="ltr" style="font-size:12.8px">TRADE log:<br>20160819-18:04:36.175 : Created session<br>20160819-18:04:36.372 : Connecting to (...) on port (...)<br>20160819-18:04:36.396 : Connection succeeded<br>20160819-18:04:36.439 : Session reset: ResetOnLogon<br>20160819-18:04:36.450 : Session reset: ResetSeqNumFlag<br>20160819-18:04:36.464 : Initiated logon request<br>20160819-18:04:36.477 : Session FIX.4.4:(TRADE) disconnecting: System.Net.Sockets.<wbr>SocketException (0x80004005): An existing connection was forcibly closed by the remote host<br>   at QuickFix.<wbr>SocketInitiatorThread.<wbr>ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)<br>   at QuickFix.<wbr>SocketInitiatorThread.Read()<br>20160819-18:04:46.398 : Connecting to (...) on port (...)<br>20160819-18:04:46.493 : Connection succeeded<br>20160819-18:04:46.497 : Session reset: ResetOnLogon<br>20160819-18:04:46.501 : Session reset: ResetSeqNumFlag<br>20160819-18:04:46.502 : Initiated logon request<br>20160819-18:04:46.511 : Received logon</p><p dir="ltr" style="font-size:12.8px">TENS log:<br>20160819-18:04:36.358 : Created session<br>20160819-18:04:36.376 : Connecting to (...) on port (...)<br>20160819-18:04:36.423 : Connection succeeded<br>20160819-18:04:36.440 : Session reset: ResetOnLogon<br>20160819-18:04:36.451 : Session reset: ResetSeqNumFlag<br>20160819-18:04:36.464 : Initiated logon request<br>20160819-18:04:36.523 : Received logon</p><p dir="ltr" style="font-size:12.8px">I then went ahead and switched the order of the session definitions in the config file, TENS then TRADE.</p><p dir="ltr" style="font-size:12.8px">TENS log:<br>20160819-18:08:58.328 : Created session<br>20160819-18:08:58.559 : Connecting to (...) on port (...)<br>20160819-18:08:58.616 : Connection failed: Authentication failed because the remote party has closed the transport stream.<br>20160819-18:09:08.562 : Connecting to (...) on port (...)<br>20160819-18:09:08.592 : Connection succeeded<br>20160819-18:09:08.603 : Session reset: ResetOnLogon<br>20160819-18:09:08.613 : Session reset: ResetSeqNumFlag<br>20160819-18:09:08.615 : Initiated logon request<br>20160819-18:09:08.680 : Received logon</p><p dir="ltr" style="font-size:12.8px">TRADE log:<br>20160819-18:08:58.549 : Created session<br>20160819-18:08:58.561 : Connecting to (...) on port (...)<br>20160819-18:08:58.629 : Connection succeeded<br>20160819-18:08:58.654 : Session reset: ResetOnLogon<br>20160819-18:08:58.665 : Session reset: ResetSeqNumFlag<br>20160819-18:08:58.679 : Initiated logon request<br>20160819-18:08:58.816 : Received logon</p><p dir="ltr" style="font-size:12.8px">In either case, the first session to be defined fails to connect on first attempt but they fail differently.</p><p dir="ltr" style="font-size:12.8px">What could be happening here?</p></div>