响应代码:非HTTP响应代码:java.net.ConnectException响应消息:非HTTP响应消息:连接超时:connect [英] Response code: Non HTTP response code: java.net.ConnectException Response message: Non HTTP response message: Connection timed out: connect

查看:868
本文介绍了响应代码:非HTTP响应代码:java.net.ConnectException响应消息:非HTTP响应消息:连接超时:connect的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jmeter执行一个脚本来进行负载测试.如果我施加了500个用户的负载,直到250个用户线程成功运行,那么连接超时错误就会出现错误.然后,对于某些线程,它再次成功运行,然后出现错误.

I am executing one script using Jmeter for load testing.I am getting error in between lets say for eg. If I applied load of 500users, till 250 users threads are running successfully then error comes of connection timed out error.Then, again it running successful for some of threads then error.

代码如下:-

    Thread Name: Thread Group 1-1274
    Sample Start: 2016-09-15 15:02:13 IST
    Load time: 21004
    Connect Time: 21004
    Latency: 0
    Size in bytes: 2206
    Headers size in bytes: 0
    Body size in bytes: 2206
    Sample Count: 1
    Error Count: 1
    Data type ("text"|"bin"|""): text
    Response code: Non HTTP response code: java.net.ConnectException
    Response message: Non HTTP response message: Connection timed out: connect

响应头:

HTTPSampleResult fields:
ContentType: 
DataEncoding: null

我需要破坏服务器.

有人可以帮我吗?

推荐答案

问题可能是由于服务器挂起,因此请检查服务器组件的运行状况.

Issue might be due to server hanging, so check the server components health.

否则,您可能会消耗所有临时端口,可以通过调整tcp堆栈来扩展这些临时端口.

Otherwise you could be consuming all ephemeral ports which you can extend by tuning the tcp stacks.

按照Kiril S.的回答,在Windows上是:

As per Kiril S. answer, on windows it would be:

在Windows上:

请按照本指南检查端口是否可能是一个问题:

Follow this guide to check if ports might be an issue:

检查2个参数:

  • MaxUserPort:将其增加到最大65534.
  • TcpTimedWaitDelay,它定义端口在使用后保持TIME_WAIT状态的时间.将该值更改为30

在Linux上:

在sysctl.conf中设置:

Set in sysctl.conf:

net.ipv4.ip_local_port_range = 1025 65000

net.ipv4.ip_local_port_range=1025 65000

这篇关于响应代码:非HTTP响应代码:java.net.ConnectException响应消息:非HTTP响应消息:连接超时:connect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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