在ORACLE 10.2.0.5上启动EM 出错及解决

通过DBCA 安装数据库的同时选择了安装OEM

但是在DBCA创建的最后报错如图:

 

意思是我的HOST 文件有问题

1.检查我的/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost
::1             localhost6.localdomain6 localhost6

改为

127.0.0.1               oracleDB
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
121.xx.xx.xx            oracleDB   

2. lsnrctl start 启动监听

并且检查lsnrctl status 是否正确

如果是静态注册的,还执行一次 动态注册  alter system register;

3.然后执行$emca -config dbcontrol db -repos recreate

重建EM

但是到了这步最后报错:

CONFIG: TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0  
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://ehomeDB:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ..................................................................
........................... failed.
------------------------------------------------------------------
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/ehomeDB_ehome/sysman/log

Dec 7, 2011 2:47:48 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /opt/oracle/product/10.2.0/db_1/bin/emctl start dbconsole
Dec 7, 2011 2:47:48 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database Control
Refer to the log file at
/opt/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ehome/emca_2011-12-07_02-36-27-PM.log for more d
etails.
Dec 7, 2011 2:47:48 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
        at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:649)
        at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:227)
        at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:196)
        at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)
        at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:494)
        at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1161)
        at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:478)
        at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:426)

4.启动不了EM ,为啥呢?注意上面的红色字部分,我去查这个文件,结构内容就是这个记录本身,找不到真正的原因。

因为是不能启动em报错,于是我手动执行 emctl start dbconsole 同时看 :tail -f  $ORACLE_HOME/<hostname>_<sid>/sysman/log/emagent.trc

看到如下报错:

2011-12-07 14:42:52 Thread-4135462592 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://ehomeDB:1158/em/upl
oad/: retStatus=-1
2011-12-07 14:42:52 Thread-4135462592 WARN  main: clear collection state due to OMS_version difference
2011-12-07 14:42:52 Thread-4135462592 WARN  command: Job Subsystem Timeout set at 600 seconds
2011-12-07 14:42:52 Thread-4135462592 WARN  upload: Upload manager has no Failure script: disabled
2011-12-07 14:42:52 Thread-4135462592 WARN  upload: Recovering left over xml files in upload directory
2011-12-07 14:42:52 Thread-4135462592 WARN  upload: Recovered 0 left over xml files in upload directory
2011-12-07 14:42:52 Thread-4121947024 ERROR ssl: Open wallet failed, ret = 28750
2011-12-07 14:42:52 Thread-4121947024 ERROR ssl: nmehlenv_openWallet failed
2011-12-07 14:42:52 Thread-4121947024 ERROR http: 6: Unable to initialize ssl connection with server, aborting connection
attempt

同时 tail -f  $ORACLE_HOME/<hostname>_<sid>/sysman/log/emdctl.trc

2011-12-07 14:43:52 Thread-4135478976 ERROR ssl: Open wallet failed, ret = 28750
2011-12-07 14:43:52 Thread-4135478976 ERROR ssl: nmehlenv_openWallet failed
2011-12-07 14:43:52 Thread-4135478976 ERROR http: 5: Unable to initialize ssl connection with server, aborting connection attempt

5.这个时候通过搜索发现了这是10.2.0.4(5)上的BUG

p8350262_10205_Generic.zip 下载到这个补丁后打上(GOOGLE后很容易找到下载链接):

 5.1   $unzip p8350262_10205_Generic.zip

          $ cd  8350262

          $ $ORACLE_HOME/OPatch/opatch  apply

Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/oracle/product/10.2.0/db_1
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.9
OUI version       : 10.2.0.5.0
OUI location      : /opt/oracle/product/10.2.0/db_1/oui
Log file location : /opt/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-12-07_15-21-26PM.log

Patch history file: /opt/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '8350262' to OH '/opt/oracle/product/10.2.0/db_1'

Running prerequisite checks...

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '8350262' for restore. This might take a while...
Backing up files affected by the patch '8350262' for rollback. This might take a while...

Patching component oracle.sysman.agent.core, 10.2.0.5.0a...
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/opt/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/SecConstants.class"
ApplySession adding interim patch '8350262' to inventory

Verifying the update...
Inventory check OK: Patch ID 8350262 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8350262 are present in Oracle Home.

OPatch succeeded.

6.打完patch ,以为这个时候可以启动了

结构emctl start dbconsole 还是报错,和上面的一样。

没办法再重装em一次:

$emca -config dbcontrol db -repos recreate

在最好一步启动的时候:这个时候报错和以前不同了:

SEVERE: Cannot start Database Control. The following ports are already in use: [EM agent port:3938].

这是端口占用的情况。提示agent 占用了 3938端口。

于是开始想用agent:

$emctl stop agent
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0  
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Agent is not running.

提示Agent 没有运行,奇怪怎么还占用这个端口,用下面这个命令再看看

#lsof -i :3938
COMMAND   PID   USER   FD   TYPE DEVICE SIZE NODE NAME
emagent 21002 oracle    5u  IPv4 101395       TCP *:dbcontrol_agent (LISTEN)

干脆kill掉

#kill -9  21002

7.再emctl start dbconsole 

ok 日志里面也没有报错,用 http://hostname:1158/em/console 也能访问,登录后也没有出现java.lang.Exception: Exception in sending Request :: null 的情况。

一切正常了

P.S. 其实刚开始第一步完成后,虽然提示HOST设置有问题,但是当时我尝试打开 https://hostIP:1158/em/console 也可以登录EM,并且可以登录SYS 但是打开后里面看到EM 其实是没有启动的,看不到数据库相关信息,有java.lang.Exception: Exception in sending Request :: null 报错。

网上大多是说这个是时区设置的问题,确实在时区修改后很多情况下也会OK,但是其实在EM 没有安装好的情况下也会这样。所以如果你改了时区还是有java.lang.Exception: Exception in sending Request :: null的报错,那么应该就说EM没有安装好,最好是重新安装吧。

出现问题多找log trc 文件看,找到问题的关键然后通过google 大神找到解决办法。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值