0
votes

I tried connecting a remote host with its TCP port.

Command prompt returns 10054 error

and the same returns when i tried from C++ application

openssl Command : s_client -connect url:port

WSAECONNRESET 10054

Connection reset by peer. An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

1
Check the remote system logs.Richard Critten
Thanks @RichardCritten I will check it out . Any ideas beyond thisAravindan Srinivasan

1 Answers

0
votes

Given that it is the case with both s_client and your (unknown) application it is likely neither the fault of your application nor of s_client. Instead the reason is likely that either a firewall in between your system and the server blocks the connection or that you are trying to connect to a service which does not speak TLS in the first place for example by connecting to a plain HTTP instead of HTTPS service. More information might be provided if you include the full output of the failed openssl s_client into your question.