服务器随机返回状态码为200的空响应

时间:2022-10-08 08:14:42

I have the same site running on two different machines (behind the same firewall), same exact code. I have created a test plan with Jmeter that just hits the home page. If I run with first url everything works as expected and get Size in bytes 17265. If I then other size I get a size of 0. Both are returning 200 status.

我有两个不同的机器(在同一防火墙后面)运行相同的站点,相同的确切代码。我用Jmeter创建了一个测试计划,只需点击主页。如果我运行第一个url,一切都按预期工作,并获得大小字节17265.如果我然后其他大小我得到大小0.两个都返回200状态。

Is there a setting on the server side that could be causing this? I dont think it is a Jmeter setting since all I am doing for the 2nd request it changing the URL

服务器端是否有可能导致这种情况的设置?我不认为这是一个Jmeter设置,因为我正在为第二次请求更改URL

服务器随机返回状态码为200的空响应 服务器随机返回状态码为200的空响应

ADDING INFORMATION My HTTP Request Default I just add the URL and change nothing else 服务器随机返回状态码为200的空响应

添加信息我的HTTP请求默认我只是添加URL并且不做任何其他更改

For the HTTP Request I didn't actuall modify ANY setting 服务器随机返回状态码为200的空响应

对于HTTP请求,我没有实现修改任何设置

This it the response body from one server: 服务器随机返回状态码为200的空响应

这是来自一台服务器的响应主体:

And this is the Other that is ALSO returning a 200 Status: 服务器随机返回状态码为200的空响应

这是其他人也返回200状态:

Edit: I had seen that article but I had already had those features installed and working unless the is an additional setting somewhere in IIS that says even if these features are installed don't use them. Assuming that the errors in the logs would be under IIS there are no errors.

编辑:我看过那篇文章,但我已经安装并运行了这些功能,除非IIS中的某个附加设置说即使安装了这些功能也不使用它们。假设日志中的错误将在IIS下,则没有错误。

服务器随机返回状态码为200的空响应

2 个解决方案

#1


2  

Your server might be requiring headers such as Accept-Encoding which JMeter is not sending by default.

您的服务器可能需要标头,例如默认情况下JMeter未发送的Accept-Encoding。

To add it in see here 服务器随机返回状态码为200的空响应

要添加它,请看这里

As well here is a JMX file testing your domain. Disable the HTTP Header Manager and you will get a 200 status but no data.

这里还有一个测试域名的JMX文件。禁用HTTP标头管理器,您将获得200状态,但没有数据。

#2


1  

As you mention in your question this is not a JMeter issue.

正如您在问题中提到的,这不是JMeter问题。

It seems the server code or configuration might not be correct as per following links (mentioned by https://*.com/users/7294900/user7294900):

根据以下链接(https://*.com/users/7294900/user7294900提及),服务器代码或配置似乎可能不正确:

And also this one:

还有这一个:

Check server logs for error logs.

检查服务器日志以获取错误日志

#1


2  

Your server might be requiring headers such as Accept-Encoding which JMeter is not sending by default.

您的服务器可能需要标头,例如默认情况下JMeter未发送的Accept-Encoding。

To add it in see here 服务器随机返回状态码为200的空响应

要添加它,请看这里

As well here is a JMX file testing your domain. Disable the HTTP Header Manager and you will get a 200 status but no data.

这里还有一个测试域名的JMX文件。禁用HTTP标头管理器,您将获得200状态,但没有数据。

#2


1  

As you mention in your question this is not a JMeter issue.

正如您在问题中提到的,这不是JMeter问题。

It seems the server code or configuration might not be correct as per following links (mentioned by https://*.com/users/7294900/user7294900):

根据以下链接(https://*.com/users/7294900/user7294900提及),服务器代码或配置似乎可能不正确:

And also this one:

还有这一个:

Check server logs for error logs.

检查服务器日志以获取错误日志