简体   繁体   English

收到错误“响应代码:非 HTTP 响应代码:org.apache.http.conn.HttpHostConnectException2777CAEZ3262 中的 ZCFCB98E32662

[英]Getting an error “Response code: Non HTTP response code: org.apache.http.conn.HttpHostConnectException” in jmeter

I am running a Load Test on my.Net web application using Jmeter.我正在使用 Jmeter 在 my.Net web 应用程序上运行负载测试。 Application Process: Launch - Login - Start Test - Answer Q&A - Home Page - Logout申请流程:启动-登录-开始测试-答疑-首页-注销

Till 500 users or sometimes 750, the test is running successfully.直到 500 个用户或有时 750 个用户,测试才成功运行。 But when I increase the load I get an Error:但是当我增加负载时,我得到一个错误:

Non HTTP response code: org.apache.http.conn.HttpHostConnectException/Non HTTP response message:
Connect to www.demoname.com:80 [www.demoname.com\/11.111.111.111] failed: Connection timed out: connect 

'11.111.111.111' - is my Server IP address '11.111.111.111' - 是我的服务器 IP 地址

I have increased the jmeter.batch file Heap memory to HEAP=-Xms1g -Xmx4g -XX:MaxMetaspaceSize=256m我已将 jmeter.batch 文件堆 memory 增加到 HEAP=-Xms1g -Xmx4g -XX:MaxMetaspaceSize=256m

Apache Jmeter version - 5.1.1r1855137 Apache Jmeter 版本 - 5.1.1r1855137

Java Version - 1.8.0_221 Java 版本 - 1.8.0_221

Server Configuration: Standard D4 v2 (8 vcpus, 28 GiB memory)服务器配置:标准 D4 v2(8 vcpus,28 GiB 内存)

How can I get rid of this error?我怎样才能摆脱这个错误?

HttpHostConnectException is basically an instance of a ConnectException which: HttpHostConnectException基本上是ConnectException的一个实例,它:

Signals that an error occurred while attempting to connect a socket to a remote address and port.表示尝试将套接字连接到远程地址和端口时发生错误的信号。 Typically, the connection was refused remotely (eg, no process is listening on the remote address/port).通常,连接被远程拒绝(例如,没有进程正在侦听远程地址/端口)。

So most probably the error is on your server side because JMeter attempts to establish the connection and fails to do this within the bounds of the defined timeout所以很可能错误在您的服务器端,因为 JMeter 尝试建立连接并且未能在定义的超时范围内执行此操作

  1. If you're absolutely sure that your application works normally you can increase connect timeout in HTTP Request Defaults如果您绝对确定您的应用程序正常工作,您可以在HTTP Request Defaults中增加连接超时

    在此处输入图像描述

  2. However a better idea would be getting to the bottom of the error and fixing it on server side, the most possible reasons are in:然而,一个更好的主意是找出错误的根源并在服务器端修复它,最可能的原因是:

    • your application is overloaded, ie lacks essential resources like CPU, RAM, Network, etc. Make sure to set up monitoring of these metrics using ie Azure Monitor or JMeter PerfMon Plugin您的应用程序过载,即缺少 CPU、RAM、网络等基本资源。确保使用Azure MonitorJMeter PerfMon Plugin设置对这些指标的监控
    • your application infrastructure is not properly configured, make sure to double check if your backend is properly tuned for high loads including IIS and MSSQL您的应用程序基础架构配置不正确,请务必仔细检查您的后端是否针对高负载进行了适当调整,包括IISMSSQL

    • it might be the case your application code is problematic, ie it cannot handle more than X users due to poorly implemented algorithms.这可能是您的应用程序代码有问题的情况,即由于算法实施不善,它不能处理超过 X 个用户。 Consider using a profiler tool like NProfiler or dotTrace to detect the most expensive functions, largest objects, etc.考虑使用像NProfilerdotTrace这样的分析器工具来检测最昂贵的函数、最大的对象等。

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

相关问题 Jmeter 非 HTTP 响应代码:org.apache.http.conn.HttpHostConnectException - Jmeter Non HTTP response code: org.apache.http.conn.HttpHostConnectException Jmeter响应代码:非HTTP响应代码:java.net.SocketException - Jmeter Response code: Non HTTP response code: java.net.SocketException 单击按钮时的HTTP响应代码 - HTTP response code on button click C#HTTP邮政编码未获得预期的响应 - C# HTTP Post code not getting expected response API 响应 Http 状态码和自定义错误码映射 - API Response Http Status Code and Custom Error Codes Mapping HTTP请求未获得响应 - HTTP Request Not Getting Response DocuSign JWT Auth Error while requesting server,收到不成功的HTTP代码错误响应正文C# ZEAE18BC41E1414DAZ989 - DocuSign JWT Auth Error while requesting server, received a non successful HTTP code Error with response Body C# sdk 请求服务器时记录错误,收到不成功的 HTTP 代码已完成,响应正文:{“error”:“consent_required”} - Docusing Error while requesting server, received a non successful HTTP code Completed with response Body: {"error":"consent_required"} SSL站点ASP的http响应代码 - http response code for SSL sites asp 从错误HTTP调用获取API响应 - Getting API response from error HTTP calling
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM