LR中錯誤代號爲27796的一個解決方法-Zee

 

問題:
 
曾經遇到過一個問題,在一次性能測試過程中,使用http協議的多用戶向服務器發送請求。設置了持續時間,出現錯誤爲:27796, Failed to connect to server 'hostname';port_ld': 'reason'.10048.(憑記憶寫的,不知道寫錯了沒有)
 
分析
 
因爲負載生成器的性能太好,發數據包特別快,服務器也響應特別快,從而導致負載生成器的機器的端口在沒有timeout之前就全部佔滿了。在全部佔滿後,就會出現上面的錯誤。執行netstat –na命令,可以看到打開了很多端口。所以就調整TCP的time out。即在最後一個端口還沒有用到時,前面已經有端口在釋放了。
 
官方的troubleshooting
查看工具的troubleshooting,如下:

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.
均不是解決之道。
 
成功的解決方法:
 
在負載生成器的註冊表HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters裏,有如下兩個鍵值:
TcpTimedWaitDelay
MaxUserPort
1,這裏的TcpTimedWaitDelay默認值應該中是30s,所以這裏,把這個值調小爲5s(按需要調整)。
2,也可以把MaxUserPort調大(如果這個值不是最大值的話)。
 
反覆驗證,問題解決。
 
 
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章