I have been trying to deal with this problem for sometime now and I believe it may have something to do with MsgSeqNum being out of sync between the client and the server but as it had began as a random thing and now makes it impossible to connect I am not so sure anymore.
Sometimes after activating the flag to reset MsgSeqNum client-side it will return a message that the server was expecting a higher MsgSeqNum and received "1" (as I had reset mine) but even if I repeatedly try to connect to increase my client-side MsgSeqNum to match the server's I arrive at this same error I show below in my log.
In the log messages like "onCreate" are just debugging messages I added to track what methods do end up getting executed.
If anyone can offer insight into this issue and anything new to try I'd appreciate it and thank you for reading!
Note: I cannot reset the server's MsgSeqNum because you can only send that flag after logging in, which I never get the chance to do.
onCreate
<20180619-19:51:30.000000000, FIX.4.4:SENDER->TARGET, event>
(Created session)
<20180619-19:51:30.000000000, FIX.4.4:SENDER->TARGET, event>
(Connecting to BROKERADDRESS on port 8101 (Source :0))
toAdmin
<20180619-19:51:30.000000000, FIX.4.4:SENDER->TARGET, outgoing>
(8=FIX.4.4 9=112 35=A 34=52 49=SENDER 52=20180619-19:51:30.000 56=TARGET 554=PASSWORD 98=0 108=5 10=220 )
<20180619-19:51:30.000000000, FIX.4.4:SENDER->TARGET, event>
(Initiated logon request)
<20180619-19:51:31.000000000, FIX.4.4:SENDER->TARGET, incoming>
(8=FIX.4.4 9=77 35=5 34=40 49=TARGET 52=20180619-19:51:31.691 56=SENDER 10=228 )
fromAdmin
<20180619-19:51:31.000000000, FIX.4.4:SENDER->TARGET, event>
(Received logout request)
toAdmin
<20180619-19:51:31.000000000, FIX.4.4:SENDER->TARGET, outgoing>
(8=FIX.4.4 9=77 35=5 34=53 49=SENDER 52=20180619-19:51:31.000 56=TARGET 10=216 )
<20180619-19:51:31.000000000, FIX.4.4:SENDER->TARGET, event>
(Sending logout response)
<20180619-19:51:31.000000000, FIX.4.4:SENDER->TARGET, event>
(Disconnecting)
onLogout
toAdmin
Your server is expecting a higher sequence number. To fix this problem, you can send ResetSeqNumFlag (Tag = 141) as Y as after this your server should also reset its sequence number.
You can use Quickfixj config ResetOnLogon as Y in your application which will automatically do this on logon.
Please refer https://www.quickfixj.org/usermanual/1.6.1/usage/configuration.html