当前位置: 首页 > 工具软件 > TAT Agent > 使用案例 >

【GC】无法找到jar命令导致Download方式安装Agent失败的处理

阎雪峰
2023-12-01
在文章《【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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/519536/viewspace-672510/

 类似资料: