Question

I have created a Fix application using 'QuickFIX/n is v1.4.0' from this 'http://www.quickfixn.org/download' site. When I executed an application,i randomly get error of sequence number.Sometimes the application runs fine and sometime I get sequence number problem.The log details are as below:

20130828-10:28:30.468 : Created session 

20130828-10:28:31.328 :> FIX.4.4:Server->Client Socket Reader 7995840 accepting session >FIX.4.4:Server->Client from 192.168.1.*:7356

20130828-10:28:31.328 :> FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:28:31.578 : Received logon 

20130828-10:28:31.625 :> Responding to logon request 

20130828-10:30:28.968 : Created session

20130828-10:30:29.796 : FIX.4.4:Server->Client Socket Reader 36610825 accepting session FIX.4.4:Server->Client from 192.168.1.*:7364

20130828-10:30:29.796 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:30.625 : Verify failed: MsgSeqNum too low,expecting 94 but received 44 

20130828-10:30:30.625 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 44 

20130828-10:30:31.375 :FIX.4.4:Server->Client Socket Reader 20554616 accepting session
 FIX.4.4:Server->Client from 192.168.1.*:7365 

20130828-10:30:31.375 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:31.468 : Verify failed: MsgSeqNum too low, expecting 94 but received 47 

20130828-10:30:31.468 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 47

20130828-10:30:32.406 : FIX.4.4:Server->Client Socket Reader 15510466 accepting session FIX.4.4:Server->Client from > 192.168.1.*:7366 

20130828-10:30:32.406 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:32.484 : Verify failed: MsgSeqNum too low, expecting 94 but received 49

20130828-10:30:32.484 : Session FIX.4.4:Server->Client disconnecting:Verify failed:MsgSeqNum too low, expecting 94 but received 49

20130828-10:30:33.390 : FIX.4.4:Server->Client Socket Reader 23324256
accepting session FIX.4.4:Server->Client from 192.168.1.*:7367

20130828-10:30:33.390 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:33.656 : Verify failed: MsgSeqNum too low,expecting 94 but received 51 

20130828-10:30:33.656 : SessionFIX.4.4:Server->Client disconnecting: Verify failed:MsgSeqNum too low, expecting 94 but received 51 

20130828-10:30:34.421 :FIX.4.4:Server->Client Socket Reader 34250480 accepting session FIX.4.4:Server->Client from 192.168.1.*:7368 

20130828-10:30:34.421 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:34.515 : Verify failed: MsgSeqNum too low, expecting 94 but received 53 
20130828-10:30:34.515 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 53 

20130828-10:30:35.546 : FIX.4.4:Server->Client Socket Reader 58408916 accepting session FIX.4.4:Server->Client from 192.168.1.*:7369 

20130828-10:30:35.546 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:35.625 : Verify failed: MsgSeqNum too low, expecting 94 but received 55

20130828-10:30:35.625 : Session FIX.4.4:Server->Client disconnecting:Verify failed: MsgSeqNum too low, expecting 94 but received 55

20130828-10:30:36.640 : FIX.4.4:Server->Client Socket Reader 2348279 accepting session FIX.4.4:Server->Client from 192.168.1.*:7370

20130828-10:30:36.640 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:36.734 : Verify failed: MsgSeqNum too low,expecting 94 but received 57 

20130828-10:30:36.734 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 57 

20130828-10:30:37.500 :FIX.4.4:Server->Client Socket Reader 61669314 accepting session
 FIX.4.4:Server->Client from 192.168.1.*:7371 

20130828-10:30:37.500 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:37.609 : Verify failed: MsgSeqNum too low, expecting 94 but received 59 

20130828-10:30:37.609 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 59 

20130828-10:30:38.531 : FIX.4.4:Server->Client Socket Reader 36865354 accepting session FIX.4.4:Server->Client from 192.168.1.*:7372 

20130828-10:30:38.531 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:38.640 : Verify failed: MsgSeqNum too low, expecting 94 but received 61

20130828-10:30:38.640 : Session FIX.4.4:Server->Client disconnecting:Verify failed: MsgSeqNum too low, expecting 94 but received 61

20130828-10:30:39.515 : FIX.4.4:Server->Client Socket Reader 3196068 accepting session FIX.4.4:Server->Client from 192.168.1.*:7373

20130828-10:30:39.515 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:39.781 : Verify failed: MsgSeqNum too low,expecting 94 but received 63 

20130828-10:30:39.781 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 63 

20130828-10:30:40.625 :FIX.4.4:Server->Client Socket Reader 4186222 accepting session
FIX.4.4:Server->Client from 192.168.1.*:7374 

20130828-10:30:40.625 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:40.718 : Verify failed: MsgSeqNum too low, expecting 94 but received 65 

20130828-10:30:40.718 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 65 

20130828-10:30:41.515 : FIX.4.4:Server->Client Socket Reader 764807 accepting session FIX.4.4:Server->Client from 192.168.1.*:7375 

20130828-10:30:41.515 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:41.796 : Verify failed: MsgSeqNum too low, expecting 94 but received 67

20130828-10:30:41.796 : Session FIX.4.4:Server->Client disconnecting:Verify failed: MsgSeqNum too low, expecting 94 but received 67

20130828-10:30:42.546 : FIX.4.4:Server->Client Socket Reader 10479095 accepting session FIX.4.4:Server->Client from 192.168.1.*:7376

20130828-10:30:42.546 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:42.640 : Verify failed: MsgSeqNum too low,expecting 94 but received 69 

20130828-10:30:42.640 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 69 

20130828-10:30:43.515 :FIX.4.4:Server->Client Socket Reader 4684807 accepting session
FIX.4.4:Server->Client from 192.168.1.*:7377 

20130828-10:30:43.515 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:43.750 : Verify failed: MsgSeqNum too low, expecting 94 but received 71 
20130828-10:30:43.750 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 71 

20130828-10:30:44.562 : FIX.4.4:Server->Client SocketReader 41662089 accepting session FIX.4.4:Server->Client from 192.168.1.*:7378 

20130828-10:30:44.562 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:44.656 : Verify failed: MsgSeqNum too low, expecting 94 but received 73

20130828-10:30:44.656 : Session FIX.4.4:Server->Client disconnecting:Verify failed: MsgSeqNum too low, expecting 94 but received 73

20130828-10:30:45.687 : FIX.4.4:Server->Client Socket Reader 46338128 accepting session FIX.4.4:Server->Client from 192.168.1.*:7379

20130828-10:30:45.687 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:45.812 : Verify failed: MsgSeqNum too low,expecting 94 but received 75 

20130828-10:30:45.812 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum toolow, expecting 94 but received 75 

20130828-10:30:46.593 :FIX.4.4:Server->Client Socket Reader 28975576 accepting session
 FIX.4.4:Server->Client from 192.168.1.*:7380 

20130828-10:30:46.593 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:46.656 : Verify failed: MsgSeqNum too low, expecting 94 but received 77 
20130828-10:30:46.656 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 77 

20130828-10:30:47.859 : FIX.4.4:Server->Client Socket Reader 11942173 accepting session FIX.4.4:Server->Client from 192.168.1.*:7381 

20130828-10:30:47.859 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:47.953 : Verify failed: MsgSeqNum too low, expecting 94 but received 79

20130828-10:30:47.953 : Session FIX.4.4:Server->Client disconnecting:Verify failed: MsgSeqNum too low, expecting 94 but received 79

20130828-10:30:48.593 : FIX.4.4:Server->Client Socket Reader 40054951 accepting session FIX.4.4:Server->Client from 192.168.1.*:7382

20130828-10:30:48.593 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 20130828-10:30:48.703 : Verify failed: MsgSeqNum too low,expecting 94 but received 81 

20130828-10:30:48.703 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum toolow, expecting 94 but received 81 

20130828-10:30:49.734 :FIX.4.4:Server->Client Socket Reader 9985467 accepting session FIX.4.4:Server->Client from 192.168.1.*:7383 

20130828-10:30:49.734 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:49.937 : Verify failed: MsgSeqNum too low, expecting 94 but received 83 

20130828-10:30:49.937 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 83 

20130828-10:30:50.703 : FIX.4.4:Server->Client Socket Reader 19425995 accepting session FIX.4.4:Server->Client from 192.168.1.*:7384 

20130828-10:30:50.703 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:51.062 : Verify failed: MsgSeqNum too low, expecting 94 but received 85

20130828-10:30:51.062 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 85

20130828-10:30:51.687 : FIX.4.4:Server->Client Socket Reader 34478086 accepting session FIX.4.4:Server->Client from 192.168.1.*:7385

20130828-10:30:51.687 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:51.781 : Verify failed: MsgSeqNum too low,expecting 94 but received 87 

20130828-10:30:51.781 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 87 

20130828-10:30:52.765 :FIX.4.4:Server->Client Socket Reader 42506536 accepting session
FIX.4.4:Server->Client from 192.168.1.*:7386 

20130828-10:30:52.765 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:52.859 : Verify failed: MsgSeqNum too low, expecting 94 but received 89 

20130828-10:30:52.859 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 89 

20130828-10:30:53.906 : FIX.4.4:Server->Client Socket Reader 26676330 accepting session FIX.4.4:Server->Client from 192.168.1.*:7387 

20130828-10:30:53.906 : FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds 

20130828-10:30:53.984 : Verify failed: MsgSeqNum too low, expecting 94 but received 91

20130828-10:30:53.984 : Session FIX.4.4:Server->Client disconnecting:Verify failed: MsgSeqNum too low, expecting 94 but received 91

20130828-10:30:54.796 : FIX.4.4:Server->Client Socket Reader 13812657 accepting session FIX.4.4:Server->Client from 192.168.1.*:7388

20130828-10:30:54.796 : FIX.4.4:Server->Client Acceptor heartbeat setto 0 seconds 

20130828-10:30:54.859 : Verify failed: MsgSeqNum too low,expecting 94 but received 93 

20130828-10:30:54.859 : Session FIX.4.4:Server->Client disconnecting: Verify failed: MsgSeqNum too low, expecting 94 but received 93 

20130828-10:30:55.812 :FIX.4.4:Server->Client Socket Reader 61488610 accepting session FIX.4.4:Server->Client from 192.168.1.*:7389 

20130828-10:30:55.812 :FIX.4.4:Server->Client Acceptor heartbeat set to 0 seconds

20130828-10:30:55.812 : Received logon 

20130828-10:30:55.843 :Responding to logon request 

20130828-10:30:55.843 : MsgSeqNum too high, expecting 94 but received 95 

20130828-10:30:55.843 : Sent ResendRequest FROM: 94 TO: 0 

20130828-10:30:55.875 : Got resend request from 49 to 0 

20130828-10:30:55.906 : Sent SequenceReset TO: 91 

20130828-10:30:55.906 : ResendRequest for messages FROM: 94 TO: 0 has been satisfied. 

20130828-10:30:55.906 : Received SequenceReset FROM:94 TO: 97 

20130828-10:31:24.421 : Session FIX.4.4:Server->Client disconnecting: Socket exception (192.168.1.*:7389): An existing connection was forcibly closed by the remote host

when i keep the following settings in config file , it works fine.The settings are as follows :

ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y

I want it to work for following settings in config file.The settings are as follows:

ResetOnLogon=N
ResetOnLogout=N
ResetOnDisconnect=N

Please kindly send me suggestions and settings to run this application without errors.

Thanks and Reguards, Vishwesh Raval.

Was it helpful?

Solution 2

Your sequence numbers are out of sync. The output you pasted says that pretty clearly.

I suggest you do some reading about FIX protocol. The unfocused nature of your question indicates that you don't know much about it. QuickFIX/n will be much easier to use and ask questions about if you spend some time learning about how the protocol actually works. It's a pretty simple protocol.

OTHER TIPS

the error message

MsgSeqNum too low, expecting XX but received YY

is related to the policy between your client and the remote server. Some servers require a Reset at every logon, while others just once a day or once a week. If you are writing a sample application just for learning the protocol, try to add this line in your config file:

ResetOnLogon=Y

But, first of all, try to spend some time to learn the protocol.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top