Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer [MsgId: MERR-27780]

时间:2022-09-29 15:47:29

解决方案一:

备注:

此方案如果请求响应时间太长,勾选“WinInet replay instead of Sockets(Windows only)”将会导致如下错误:

Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer  [MsgId: MERR-27780]

即使此时修改如下参数也不会生效:

Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer  [MsgId: MERR-27780]

WinInet replay instead of Sockets(Windows only)勾选后,请求超过20s将会报27492的错误

网站回访报如下错误:

Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer  [MsgId: MERR-27780]

解决方案:

vuser ->run-time settings ->preferences ->勾上WinInet replay instead of Sockets(Windows only)

Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer  [MsgId: MERR-27780]

再次回放,脚本回放成功

原理:

vugen  user's  guide 提到 :

Advanced Web run-time options WinInet Replay (instead of Sockets): Instructs VuGen to use the WinInet replay engine. VuGen has two HTTP replay engines: Sockets-based (default) or WinInet based. The WinInet is the engine used by Internet Explorer and it supports all of the features incorporated into the IE browser. The limitations of the WinInet replay engine are that it is not scalable, nor does it support UNIX. In addition, when working with threads, the WinInet engine does not accurately emulate the modem speed and number of connections. 



VuGen's proprietary sockets-based replay is a lighter engine that is scalable for load testing. It is also accurate when working with threads. The limitation of the sockets-based engine is that it does not support SOCKS proxy. If you are recording in that type of environment, use the WinInet replay engine. 



从上可知,winInet replay 支持集成如IE的所有特征。回放时,底层的winInet函数完成SSL握手过程。同时每种mode均有优劣。

文章摘自:http://www.ithao123.cn/content-10377664.html

解决方案二:

在报错的链接前面加上如下代码:

web_set_sockets_option("SSL_VERSION","TLS);
Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer  [MsgId: MERR-27780]

再次回放问题得到解决,而且同时能够解决请求应答时间超过20s的请求

解决方案二的原文来自:https://community.hpe.com/t5/LoadRunner-Practitioners-Forum/GENERAL-MSG-CAT-SSL-ERROR-Connection-failed-to-host-during/td-p/6202935