【GC】無法找到jar命令導致Download方式安裝Agent失敗的處理

secooler發表於2010-09-02
在文章《【GC】使用 agentDownload.linux完成Grid Control Agent的快速部署安裝》(http://space.itpub.net/519536/viewspace-667753)中給出了使用download方式安裝Agent的很多先決條件。本文將給大家展示一下如果沒有找到jar檔案會出現的報錯資訊。防患於未然。

1.關於環境變數PATH的正確設定
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/jdk/bin:$PATH

其中$ORACLE_HOME/jdk/bin便是jar檔案藏身之處。為了保證Agent的順利部署,建議在環境變數在profile中提前準備好。

2.當無法找到jar檔案時的報錯資訊如下,供參考
[oracle@secdb1 ~]$ ./agentDownload.linux -b /u01/app/oracle/agent
agentDownload.linux invoked on Sun Sep  2 22:22:43 CST 2010 with Arguments "-b /u01/app/oracle/agent"
Platform=Linux, S=linux
GetPlatform.:returned=0, and os is set to: linux, platform=Linux
LogFile for this Download can be found at: "/home/oracle/agentDownload10.2.0.1.0Oui/agentDownload.linux080110142243.log"
Running on Selected Platform. Linux
Installer location: /home/oracle/agentDownload10.2.0.1.0Oui
Downloading Agent install response file ...
--22:22:43--  http://secdb2.localdomain:4889/agent_download/10.2.0.1.0/agent_download.rsp
           => `agent_download.rsp'
Resolving secdb2.localdomain... 192.168.23.102
Connecting to secdb2.localdomain|192.168.23.102|:4889... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19,993 (20K) [text/plain]

100%[=================================================================================================================>] 19,993        --.--K/s

22:22:43 (130.59 MB/s) - `agent_download.rsp' saved [19993/19993]

Finished Downloading with Status=0
Downloaded response with status=0
Downloading Oracle Installer ...
--22:22:43--  http://secdb2.localdomain:4889/agent_download/10.2.0.1.0/linux/oui/oui_linux.jar
           => `oui_linux.jar'
Resolving secdb2.localdomain... 192.168.23.102
Connecting to secdb2.localdomain|192.168.23.102|:4889... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46,620,679 (44M) [application/java-archive]

100%[=================================================================================================================>] 46,620,679    38.15M/s

22:22:44 (38.10 MB/s) - `oui_linux.jar' saved [46620679/46620679]

Downloaded Oracle Installer with status=0
Downloading  Unzip Utility ...
--22:22:44--  http://secdb2.localdomain:4889/agent_download/10.2.0.1.0/linux/agent/install/unzip
           => `unzip'
Resolving secdb2.localdomain... 192.168.23.102
Connecting to secdb2.localdomain|192.168.23.102|:4889... connected.
HTTP request sent, awaiting response... 200 OK
Length: 101,448 (99K) [text/plain]

100%[=================================================================================================================>] 101,448       --.--K/s

22:22:44 (47.17 MB/s) - `unzip' saved [101448/101448]

Adding execute permissions to unzip ...
Downloaded UnzipUtility with status=0
which: no jar in ((null))
The jar to be used=
which: no jar in ((null))
Can't find the jar utility. Add jar to your PATH and try again.
Removing the copied stuff.....
Removed: /home/oracle/agentDownload10.2.0.1.0Oui/oui_linux.jar
Removed: /home/oracle/agentDownload10.2.0.1.0Oui/agent_download.rsp
Removed:/home/oracle/agentDownload10.2.0.1.0Oui/Disk1
Log name of installation can be found at: "/u01/app/oracle/agent/agent10g/agentDownload.linux080110142243.log"


3.問題處理
在錯誤的提示資訊中我們已經可以看到處理方法:“Add jar to your PATH and try again.”。
將jar位置新增到環境變數中,然後重新安裝即可。

4.小結
我們歡迎錯誤提示,因為錯誤資訊中充滿了指引我們前進的資訊。這些資訊可以協助我們快速解決問題。
現實情況是:很多朋友將錯誤提示作為過眼雲煙,更有可能連“過眼”的機會都不給!

Good luck.

secooler
10.09.02

-- The End --

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-672510/,如需轉載,請註明出處,否則將追究法律責任。

相關文章