加特林j.n.ConnectException:地址已在使用中 [英] Gatling j.n.ConnectException: Address already in use

查看:75
本文介绍了加特林j.n.ConnectException:地址已在使用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用加特林(Gatling)运行仿真时,出现以下异常:

When running simulations with Gatling I get the following exceptions:

j.n.ConnectException:地址已在使用中:没有更多信息

j.n.ConnectException: Address already in use: no further information

当针对其进行测试的服务器无法响应或超时时,会发生这种情况吗? 我想确保这是服务器而非客户端抛出的异常.

Does this occur when the server tested against fails to respond or timeout? I want to make sure this is a exception thrown by the server and not by the client.

推荐答案

我也遇到了在Windows上运行Gatling(请求很多,> 100 RPS)的问题.似乎Windows用尽了临时端口.请参阅用户组论坛中的此讨论.因此,这不是正在测试的系统的问题,而是运行Gatling的计算机的问题.

I also encountered this problem running Gatling (with a lot of requests, > 100 RPS) on Windows. It seems Windows is running out of ephemeral ports to use. See this discussion in the user group forum. So this is not a problem with your system under test, but with the machine running Gatling.

在Windows上,您可以

On Windows, you can see and change your ephemeral port range using the netsh command. You can use following commands to

  • 查看您当前为TCP配置的IPv4端口范围:

  • see your currently configured IPv4 port range for TCP:

netsh int ipv4 show dynamicport tcp

  • 更改端口范围:

  • change the port range:

    netsh int ipv4 set dynamic tcp start=number num=range
    

  • 例如,我增加了短暂的IPv4 TCP端口范围,以解决此问题:

    E.g., I increased my ephemeral IPv4 TCP port range like so to resolve the problem:

    netsh int ipv4 set dynamic tcp start=1025 num=57975
    

    这篇关于加特林j.n.ConnectException:地址已在使用中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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