PMP ,专注于WEB功能测试、性能测试、安全测试的研究,从事全面质量管理工作。曾任多家公司测试经理、测试主管。在电子政务、银行、电商、跨境电商、直播电商领域工作多年,曾获得某龙头集团公司公测一等奖,曾任职某头部直播电商公司测试团队负责人,具有业务敏感性,擅长从0到1搭建测试团队,具有海外工作经历,以及质量管理体系搭建。邮箱:89233502@qq.com

LR中错误代号为27796的一个解决方法

上一篇 / 下一篇  2011-11-09 18:02:25 / 个人分类:性能测试

曾经遇到过一个问题,在一次性能测试过程中,使用http协议的多用户向服务器发送请求。设置了持续时间,出现错误为:27796, Failed to connect to server 'hostname';port_ld': 'reason'.10048.(凭记忆写的,不知道写错了没有)

[b]分析:[/b]

因为负载生成器的性能太好,发数据包特别快,服务器也响应特别快,从而导致负载生成器的机器的端口在没有timeout之前就全部占满了。在全部占满后,就会出现上面的错误。执行netstat –na命令,可以看到打开了很多端口。所以就调整TCP的time out。即在最后一个端口还没有用到时,前面已经有端口在释放了。

[b]官方的troubleshooting:[/b]
查看工具的troubleshooting,如下:[code]Message Code 27796 
Failed to connect to server 'hostname';port_ld': 'reason'.
Unable to connect to the specified server and port. 
Troubleshooting 
o      Try to address the reason provided for the connection failure.
o      Try to access the application with a browser from the injector machine and from another machine (such as the recording machine).
o      Check that you accurately specified the correct host name and port.
o      Ping the host/port.
o      Check if the server application you are trying to access is running.
o      If you used a hostname, check if it was resolved to the correct address.
o      Check if the server application is listening to the right port. [/code]均不是解决之道。

[b]成功的解决方法:[/b]

在注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters里,有如下两个键值:
TcpTimedWaitDelay
MaxUserPort
1,这里的TcpTimedWaitDelay默认值应该中是30s,所以这里,把这个值调小为5s(按需要调整)。
2,也可以把MaxUserPort调大(如果这个值不是最大值的话)。
3、使用IP欺骗
4、在Controller中搭建测试场景时,打开Run-Time Settings,把Brower Emulation---“Simulate a new user on each interation”这一项去掉
5、把错误结果页面 提示的嵌套的网址暂时拿掉   分析一下嵌套的模块那里是不是有问题  

TAG:

 

评分:0

我来说两句

Open Toolbar