简体   繁体   English

Quickfix套接字错误:对等c ++重置连接

[英]Quickfix Socket Error: Connection reset by peer c++

I'm getting a "Socket Error: Connection reset by peer" message using the tradeclient c++ demo code from the quickfix download. 我从quickfix下载中使用tradeclient c ++演示代码收到“套接字错误:对等连接重置”消息。

another user commented that it was related to network issues. 另一位用户评论说这与网络问题有关。 if anyone has the solution it would be appreciated. 如果有人有解决方案,将不胜感激。

QuickFix C++ Socket Error Connection Reset By Peer? QuickFix C ++套接字错误连接是否被对等重置?

<20141221-17:32:11.049, FIX.4.4:myusername->hostusername, event>
      (Created session)
    <20141221-17:32:11.056, FIX.4.4:myusername-> hostusername, event>
      (Connecting to fix.hostusername.com on port 5001)
    <20141221-17:32:11.221, FIX.4.4:myusername-> hostusername, outgoing>
      (8=FIX.4.49=10735=A34=149=myusername =20141221-17:32:11.21856= hostusername    98=0108=30141=Y10=000)
    <20141221-17:32:11.221, FIX.4.4:myusername-> hostusername, event>
      (Initiated logon request)
    <20141221-17:32:11.253, FIX.4.4:myusername-> hostusername, event>
      (Socket Error: Connection reset by peer.)
    <20141221-17:32:11.253, FIX.4.4:myusername-> hostusername, event>
      (Disconnecting)

think i found the reason. 想我找到了原因。 the host I'm trying to connect with is using quickfix java which supports SSL. 我尝试连接的主机正在使用支持SSL的quickfix java。 the quickfix c++ client doesn't seem to support the SSL enable tag in the session settings. quickfix c ++客户端在会话设置中似乎不支持SSL enable标签。 finally had to resort to wireshark to determine this. 最终不得不求助于wireshark来确定这一点。 i searched all over the web and many people were reporting this similar error. 我在整个网络上进行了搜索,许多人报告了类似的错误。 i hope this post saves them any anyone in the future from debugging endlessly to solve this "Socket Error: Connection reset by peer" error. 我希望这篇文章可以使他们免于以后不断调试以解决此“套接字错误:对等重置连接”错误。

Two reasons I am aware of for "Socket Error: Connection reset by peer" are:- 我知道"Socket Error: Connection reset by peer"两个原因是:

1) Your SenderCompId/TargetCompId does not match with that of other side. 1)您的SenderCompId/TargetCompId与另一端不匹配。 In that case just make sure you are using correct one. 在这种情况下,只需确保您使用的是正确的即可。

2) Other one is that sequence number expected by server is something different what you are sending. 2)另一个是服务器期望的序列号与您发送的序列号有所不同。 In that case just try with ResetOnLogon field ( in your registry file )to No and check if that resolves the issue. 在这种情况下,只需尝试将ResetOnLogon字段(在注册表文件中)设置为“否”,然后检查是否可以解决问题。

There can be many reasons for this error. 此错误可能有很多原因。 However, I doubt it that network is responsible for this error as connection request has been sent to server properly. 但是,我怀疑网络是否会对此错误负责,因为连接请求已正确发送到服务器。 You could search through the internet for wider range of answers. 您可以通过互联网搜索更多答案。

可能是防火墙,您是否拥有正确的IP和端口以及访问该服务器的权限?

think i found the reason. 想我找到了原因。 the host I'm trying to connect with is using quickfix java which supports SSL. 我尝试连接的主机正在使用支持SSL的quickfix java。 the quickfix c++ client doesn't seem to support the SSL enable tag in the session settings. quickfix c ++客户端在会话设置中似乎不支持SSL enable标签。 finally had to resort to wireshark to determine this. 最终不得不求助于wireshark来确定这一点。 i searched all over the web and many people were reporting this similar error. 我在整个网络上进行了搜索,许多人报告了类似的错误。 i hope this post saves them any anyone in the future from debugging endlessly to solve this "Socket Error: Connection reset by peer" error. 我希望这篇文章可以使他们免于以后不断调试以解决此“套接字错误:对等重置连接”错误。 – geiger zaehler –盖格·扎勒

当我们没有正确导入安全证书时,我们会收到此错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM