现象:
Jagent无法随crs启动,但是通过命令行接口./ggsci启动jagent可以。
Jagent无法随crs启动,但是通过命令行接口./ggsci启动jagent可以。
分析:
进群调用ogg启动是通过脚本文件,比如gg_action.scr来控制的。该脚本通过 $OGG_HOME/dirpcs/MGR.pcm来判断当前OGG的状态是运行还是关闭。 该脚本中容易出错的地方就是系统环境变量。很多人喜欢用export方式来手工添加,比如:
进群调用ogg启动是通过脚本文件,比如gg_action.scr来控制的。该脚本通过 $OGG_HOME/dirpcs/MGR.pcm来判断当前OGG的状态是运行还是关闭。 该脚本中容易出错的地方就是系统环境变量。很多人喜欢用export方式来手工添加,比如:
gg_action.scr
export OGG_HOME=
export ORACLE_HOME=
export LIBPATH=
如果这个过程出现失误,会导致OGG启动时环境变量加载错误使得Jagent进程无法启动。从报错信息上看很难定位问题,会以为是JDK版本的导致的。
ERROR JAgentWSMain - Error Initializing JAgent. JAgent will not be initialized and about to return.
ERROR JAgentWSMain - Error Initializing JAgent. JAgent will not be initialized and about to return.
Exception: org.springframework.beans.factor.BeanCreationException: Error creating bean with name ‘agentBootstrapper’: Injection of resource dependencies failed; nested exception is java.lang.NoClassDefFoundError: javax.xml.bind.JAXBException
建议做法:
将整个系统环境变量引入到gg_action.scr,在文件最前面添加profile
#!/bin/sh
. /home/oracle/.profile
start_delay_secs=5
check_process (){
...
}
..
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29047826/viewspace-1808539/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29047826/viewspace-1808539/