JMeter TCP采样器错误报告500 [英] JMeter TCP Sampler incorrectly reports 500

查看:1525
本文介绍了JMeter TCP采样器错误报告500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JMeter使用TCP Sampler(BinaryTCPClientImpl类)触发HELO来负载测试我们的SMTP服务器,等待30秒然后退出.

I'm using JMeter to load test our SMTP server using the TCP Sampler (BinaryTCPClientImpl class) to fire HELOs, wait for 30 seconds and then QUITing.

SMTP服务器接受HELO并做出相应的响应,并使用JMeter记录正确的响应,但是它似乎找不到响应,而是命中响应超时,并显示500个请求失败.

The SMTP server accepts the HELO and responds accordingly, with JMeter logging the correct response, however it does not appear to find then of the response and instead hits the response timeout and shows a 500 fail for the request.

在JMeter日志中显示:

In the JMeter logs it says:

ERROR - jmeter.protocol.tcp.sampler.TCPSampler:      org.apache.jmeter.protocol.tcp.sampler.ReadException:
at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:137)
at org.apache.jmeter.protocol.tcp.sampler.TCPSampler.sample(TCPSampler.java:350)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:271)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:123)

尽管它设法记录了预期的响应,但仍然如此!

This despite the fact it managed to log the expected response!

我猜JMeter在某种程度上未能发现响应的结束?

I'm guessing JMeter has somehow failed to spot the end of the response?

任何有关如何解决或调试此问题的想法将不胜感激.

Any thoughts in how to solve or debug this would be much appreciated.

推荐答案

如果您未定义

If you don't define the EOM byte, it reads until the end of the stream. Since the stream isn't going to end, it times out. You have to set the EOM byte correctly for the protocol you're using.

这篇关于JMeter TCP采样器错误报告500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆