html tool

2014年12月24日星期三

loadrunner " Address already in use Try changing the registry value"

问题描述:
负载生成器提示:
Action.c(24): Error -27796: Failed to connect to server "qiye.99114.com:80": [10048] Address already in use
Try changing the registry value
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\TcpTimedWaitDelay to 30
and HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\MaxUserPort to 65534
and rebooting the machine

解决过程:
直接位置:https://support.microsoft.com/kb/319502/
"
TcpTimedWaitDelay
密钥: Tcpip\Parameters
值类型: REG_DWORD 时间以秒为单位)
有效范围: 30-300 (十进制)
默认值: 0xF0 (240 十进制)
 此参数确定在关闭该连接时,连接将保留在 TIME_WAIT 状态的时间长度。在 TIME_WAIT 状态的连接时,将套接字对不能重新使用。有关详细的信息,请参阅 RFC 793。
注意: 如果将MailboxCacheTTL设置得非常低,这个问题得更糟。如果进行上文所述的注册表更改之后,问题仍然存在,可以增加邮箱 TTL 更改中的 SiteConfig.cfg 文件 (适用于 Microsoft 服务器安装的配置文件) 的MailboxCacheTTL设置。
通过修改 MaxUserPort 注册表项来增加约有 20,000 端口的匿名端口 (例如) 使用的端口范围。Windows 使用其匿名 (临时) 的端口范围 1024年到 5000 的传统 BSD 范围。您可以设置仅临时端口范围上限。若要修改 MaxUserPort 注册表项,请按照下列步骤操作:

启动注册表编辑器 (Regedt32.exe)。
在注册表中找到 MaxUserPort 项:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
在 编辑 菜单上单击 添加值,然后添加以下注册表值:

值名称: MaxUserPort
数据类型: REG_DWORD
值: 65534 (例如)
有效范围: 5000-65534 (十进制)
默认值: 0x1388 (5000 十进制)
退出注册表编辑器。
说明: 此参数控制应用程序请求任何可用的用户的端口从系统时所用的最大端口数。通常,临时 (也就是短暂) 端口被分配给 1024年的值和 5000 (含) 之间。

"

问题解决:
https://groups.google.com/forum/#!topic/LR-LoadRunner/rdX7HtRPbTI
"
I am uncertain how changing the values you note in the registry would have any impact on a address conflict.   You have two possibilities here.  (1) You have a re-use of a local port already in use for the transient client side port connection to the server or (2) you have a server side conflict.   Let’s take a divide and conquer approach.  



I am assuming you are following best practices and have at least three load generators involved, not including your controller (2 primary plus 1 control).   Do the errors follow to all load generators?  Is your lightly loaded control generator impacted at the same rate as the two primary load generators?   If only a single load generator is impacted and not the others, then you have your answer.  It is a local issue that needs resolution.   Find what is happening on the problematic load generator which is different and fix that.    Goes back to testing 101 stuff regarding documented initial conditions for both the app and the environment.



Now, if you have errors which are crossing all load generators, both primary load and the lightly loaded control generator, then you most likely have a server side issue to address where you may have a restriction on the number of concurrent ports on the server side so it is attempting to re-use an already open transient client connection, hence the conflict.



This is a prime opportunity to leverage those foundation skills in testing!   You need to be able to easily troubleshoot items such as this before you are able to look inside complex application architectures for issues.
"
[popexizhi]
从上文分析我应该在加一个负载生成器才是下一步解决之道
(1) You have a re-use of a local port already in use for the transient client side port connection to the server or 我本地应该是重复使用端口了
(2) you have a server side conflict.

没有评论:

发表评论