Loadrunner中遇到Failed to connect to server[10061] connection refused错误

(1)run-time setting/browser emulation中,将simulate a new user on each iteration  选项去掉(默认是选中的)。

重新运行一切正常,没有错误出现。

去掉这个选项的意思是,始终使用一个tcp/ip链接,不断开,也就是开发人员所说的长链接或持久连接

(2)登录负载机,运行:regedit打开系统注册表,找到HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/ Services/TCPIP/Parameters路径

右击右侧空白处,新建REG_DWORD 值,命名为TcpTimedWaitDelay,并更改其值为5s。(若存在直接更改值即可)

右击右侧空白处,新建REG_DWORD 值,命名为MaxUserPort,并更改其值为65534。(若存在直接更改值即可,注意:更改值的时候应选中十进制)

重启负载机

修改后运行场景还是有这个错误,报错数量比修改前少了

原文地址:https://www.cnblogs.com/ly2018/p/8509419.html