之前配置过Linux和windows平台下的EM,都能十分顺利的完成,但最近使用同样的方法在AIX上确碰到一些问题。
EM使用不正常,点击某些链接时,经常会出现一些JAVA报错,于是把现有的EM相关配置删除:
SQL> drop user sysman cascade;
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS;
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
完成后,重建EM:
$ emca -config dbcontrol db -repos create -cluster
填写相关信息...
完成配置,但过程中有:
Oct 15, 2009 10:42:20 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5541 is already in use.
Oct 15, 2009 10:42:20 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5521 is already in use.
Oct 15, 2009 10:42:20 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Oct 15, 2009 10:42:20 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 3938 is already in use.
把EM关闭:emctl stop dbconsole,查看相关端口仍然被占用,然后使用metalink中的方法:
For Unix Platforms
------------------
ps -ef|grep dbconsole | awk ' { print $2} ' | xargs kill -9
ps -ef|grep emagent (selectively remove the dbconsole's emagent process)
ps -ef|grep dbsnmp (selectively remove the dbconsole's dbsnmp process)
执行后,端口依然还是被占用,真是没办法,只能换端口了。
$ emca -reconfig ports -cluster -DBCONTROL_HTTP_PORT 1159 -AGENT_PORT 3939 -RMI_PORT 5522 -JMS_PORT 5542
执行完命令后,启动em
$ emctl start dbconsole
但还是有报错:
ps: 0509-048 Flag -o was used with invalid list.
ps: Not a recognized flag: -
Usage: ps [-ANPaedfklmMZ] [-n namelist] [-F Format] [-o specifier[=header],...]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T
pid] [ -L pidlist]
Usage: ps [aceglnsuvwxU] [t tty] [processnumber]
Starting Oracle Enterprise Manager 10g Database Control .............. started.
这时,通过metalink,找到Doc ID:758568.1,方法如下:
a) Stop DBConsole - 'emctl stop dbconsole'
b) Take backup of 'emctl.pl' from $ORACLE_HOME/bin
c) Edit emctl.pl and goto line number 1314, which is:
$ps=`ps -p $PID -o cmd --cols 1000 |grep DEMDROOT`;
Modify above line as below:
$ps=`ps -p $PID -o args | grep DEMDROOT`;
d) Save the file.
e) Start DBConsole - 'emctl start dbconsole' from $ORACLE_HOME/bin
至此EM能正常启动了,如果不想使用https,可以emctl unsecure dbconsole取消,反之emctl secure dbconsole可配置em通过ssl访问。