1. 程式人生 > >LoadRunner監控Linux資源時,無法監控到資料指標47190錯誤解決

LoadRunner監控Linux資源時,無法監控到資料指標47190錯誤解決

一、41790錯誤內容詳情和截圖:

47190 Monitor name :UNIX Resources. Cannot initialize the monitoring on ​(對應的ip地址). Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this verification). Detailed error: RPC: Failed to create RPC client.

二、解決方案概覽:

安裝rstatd,重啟xinted服務,把vsftpd服務停掉(如果目前使用的系統預設埠號有21的,因為rpc.rstatd的預設埠為21,二者會產生衝突),修改配置檔案,重啟了rpc.rstatd

Detailed error: RPC: Failed to create RPC client.

上述問題的實質是Linux系統中未安裝rpc.rstatd,服務未開啟的原因造成

三、解決方案詳細步驟:

下面來驗證我們的推測:

首先檢視rpc.rstatd是否安裝

[[email protected]localhost bin]# whereis rpc.rstatd

發現系統未安裝rpc.rstatd

備註:rstatd Rstat協議允許網路上的使用者獲得同一網路上各機器的效能引數。

1. 首先在Linux伺服器上安裝rpc.rstatd服務,這裡用的是rpc.rstatd-4.0.1.tar.gz安裝包,如果沒有可以到該網址上去下載:http://sourceforge.net/projects/rstatd

2. 執行安裝包

tar -xzvf  rpc.rstatd-4.0.1.tar.gz   //解壓rcp.rstatd

cd  rpc.rstatd-4.0.1            //進入到rpc.rstatd目錄中

./configure                  //配置rc.rstatd的安裝,以下我的是按照預設方式的            

make                      //編譯rc.rstatd  

make install               //安裝

3. 重新啟動xinetd:  /etc/init.d/xinetd restart;

4. 修改etc/xinetd.d 目錄下的3個conf(rlogin,rsh,rexec)檔案中的disable均設定為no

   cd /etc/xinetd.d   //進入到etc/xinetd.conf目錄中 

Vi    rlogin //編輯disable=no,儲存

Vi    rsh    //編輯disable=no,儲存

Vi    rexec //編輯disable=no,儲存

5. 啟動rpc.rstatd並檢視是否真正啟動該服務

  rpc.rstatd                //啟動rpc.rstatd程序

rpcinfo –p              //執行此命令檢查rpc服務的狀態

[[email protected] xinetd.d]# rpcinfo -p

結果如下:

 從上圖中可以看出rpc.rstatd服務已經啟動

6. 啟動LR並監控Linux系統資源:

   在controller中,將System resource Graphs中的Unix resources拖到右側的監控區域中,並單擊

   滑鼠右鍵選擇“Add Measurements”,在彈出的對話方塊中輸入被監控的linux系統的IP地址,

   然後選擇需要監控的效能指標,並點選“確定”,出現如下結果:

Monitor name :UNIX Resources. Cannot initialize the monitoring on 10.10.15.62. 
Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this verification).
Detailed error: RPC: Failed to create RPC client.
RPC-TCP: Failed to establish RPCserveraddress.
RPC-TCP: Failed to communicate with the portmapper on host '10.10.15.62'.
RPC: RPC call failed.
RPC-TCP: recv()/recvfrom() failed.
RPC-TCP: Timeout reached. (entry point: CFactory::Initialize). [MsgId: MMSG-47190]

檢查原因,發現是Linux系統中的防火牆開啟了並且阻擋了LoadRunner監控Linux系統的資源,因此要將防火牆關閉。

7.關閉防火牆: [[email protected] ~]# /etc/init.d/iptables stop;

8. 重複步驟6,成功後結果如下圖所示:

  

 通過上面的例項可以得知,有些時候防火牆也會阻止一些服務或功能,只要關閉它即可。