O: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ora10g/emca_2014-10-20_11-22-43-AM.log. Oct 20, 2014 11:24:49 AM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ... Oct 20, 2014 11:25:53 AM oracle.sysman.emcp.ParamsManager getLocalListener WARNING: Error retrieving listener for bak Oct 20, 2014 11:26:15 AM oracle.sysman.emcp.EMConfig perform SEVERE: Cannot start Database Control. The following ports are already in use: [EM agent port:3938]. Refer to the log file at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ora10g/emca_2014-10-20_11-22-43-AM.log for more details. Could not complete the configuration. Refer to the log file at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ora10g/emca_2014-10-20_11-22-43-AM.log for more details. [oracle@bak log]$ cat /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ora10g/emca_2014-10-20_11-22-43-AM.log
发现也是一堆报错,其中有一段是这样的,显示地主机命名还是之前旧的信息(原来的主机名为zlm,现在的为bak):
CONFIG: emdProps: /u01/app/oracle/product/10.2.0/db_1/bak_ora10g/sysman/config/emd.properties url: http://zlm:1158/em Oct 20, 2014 11:24:49 AM oracle.sysman.emcp.EMDBPreConfig isDBControlSecure CONFIG: isDbcSecure: false Oct 20, 2014 11:24:49 AM oracle.sysman.emcp.ParamsManager setFlag CONFIG: Flag 'IS_DBCONSOLE_SECURED' set to false Oct 20, 2014 11:24:49 AM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ... Oct 20, 2014 11:24:49 AM oracle.sysman.emcp.util.PlatformInterface getSortedEnvArray CONFIG: New Env List: [DISPLAY=, NEED_EXIT_CODE=1, ORACLE_SID=ora10g, PATH=/usr/sbin:/u01/app/oracle/product/10.2.0/db_1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/home/oracle/bin, TZ=] Oct 20, 2014 11:24:49 AM oracle.sysman.emcp.util.PlatformInterface executeCommand CONFIG: Starting execution: /u01/app/oracle/product/10.2.0/db_1/bin/emctl stop dbconsole Oct 20, 2014 11:25:43 AM oracle.sysman.emcp.util.PlatformInterface executeCommand CONFIG: Exit value of 0 Oct 20, 2014 11:25:43 AM oracle.sysman.emcp.util.PlatformInterface executeCommand CONFIG: Execution of /u01/app/oracle/product/10.2.0/db_1/bin/emctl stop dbconsole completed successfully Oct 20, 2014 11:25:43 AM oracle.sysman.emcp.util.PlatformInterface executeCommand CONFIG: TZ set to PRC Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://zlm:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... ... Stopped.
看来仅仅重新配置一下EM资料库是不行的,需要重建一下(先删除,后创建)
[oracle@bak log]$ emca -repos recreate shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine current working directory.
该错误表示 getcwd 命令无法定位到当前工作目录。一般来说是因为 cd 到了某个目录之后又rm 了这个目录
这时去执行某些命令就会报 getcwd 错误?,只需要 cd 到任何一个实际存在的目录下在执行命令即可。
出现这种现象的原因还有,当前用户没有当前目录的可执行权限,如没有正确设置ORACLE_SID环境变量,我这里属于这种情况。
[oracle@bak log]$ set ORACLE_SID=ora10g [oracle@bak log]$ emca -repos recreate
STARTED EMCA at Oct 20, 2014 11:49:36 AM EM Configuration Assistant, Version 10.2.0.1.0 Production Copy |