OEM打不开
问题描述:早上就有客户说OEM打不开,但是数据库运行正常。
环境:主机是HP-unix环境,oracle 10.2.0.3 RAC
首先检查agent的状态
$ emctl status agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 10.1.0.5.1
OMS Version : 10.1.0.5.0
Proto Version : 10.1.0.2.0
Agent Home : /oracle/dbs10g/10.2/asterix_BOSSPNGP1
Agent binaries : /oracle/dbs10g/10.2
Agent Process ID : 1409190
Parent Process ID : 1265676
Agent URL : http://asterix.pngmail.com:3938/emd/main
Started at : 2008-07-07 10:02:01
Started by user : oracle
Last Reload : 2008-07-07 10:02:01
Last successful upload : (none)
Last attempted upload : 2008-07-07 11:32:09
Total Megabytes of XML files uploaded so far : 0.00
Number of XML files pending upload : 265
Size of XML files pending upload(MB) : 54.77
Available disk space on upload filesystem : 6.37%
---------------------------------------------------------------
Agent is Running and Ready
$ emctl upload agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
upload failed with ret=-10
upload的时候报错,上metalink查找解决方案
metalink上有个相似的案例:Note:396238.1,并且有solution.
Solution
There are two solutions for this:
1) Either modify the value(s) of the following parameters :
UploadMaxBytesXML
UploadMaxNumberXML
Then, restart the agent
Or,
2) Execute the following steps:
(i) Stop the agent
/bin/emctl stop agent
(ii) Delete any pending upload files from the agent home
If non RAC agent :
rm -r /sysman/emd/state/*
rm -r /sysman/emd/upload/*
rm /sysman/emd/lastupld.xml
rm /sysman/emd/agntstmp.txt
rm /sysman/emd/protocol.ini
If RAC agent :
rm -r //sysman/emd/state/*
rm -r /nodeNN>/sysman/emd/upload/*
rm /nodeNN>/sysman/emd/lastupld.xml
rm /nodeNN>/sysman/emd/agntstmp.txt
rm /nodeNN>/sysman/emd/protocol.ini
(iii) Start the agent
/bin/emctl start agent
(iv) Force an upload to the OMS
/bin/emctl upload
但是 按照metalink的方法没用,所以尝试先删除再重建。
$emca -deconfig dbcontrol db -repos drop –cluster
Jul 14, 2008 2:45:37 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/oracle/dbs10g/10.2/cfgtoollogs/emca/BOSSPNGP/emca_2008-07-14_02-45-03-AM.log.
Jul 14, 2008 2:45:40 AM oracle.sysman.emcp.EMDBPreConfig
performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Jul 14, 2008 2:45:40 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
但是到这一步就hang住了没反应了。有可能什么进程将资源锁住了,没办法只好中断。
Solution
1.Stop the dbconsole and agent on rac1 and rac2
2.kill the dbconsole processes on rac1 and rac2
ps -ef|grep oc4j|grep oracle
ps -df|grep agent|grep oracle
ps -ef|grep java|grep oracle
ps -ef|grep dbconsole|grep oracle
将这些相关的进程全部kill掉
然后再运行
$ emca -deconfig dbcontrol db -repos drop -cluster
Enter the following information:
Database unique name: EM102
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
This emca command does the following:
这一次成功的删除了。
然后就是重新配置
$ emca -config dbcontrol db -repos create -cluster
Enter the following information:
- Database unique name -- If you're not sure of the values for Database unique name
and service name, execute the following statement
connected as a DBA user to any instance of the RAC database:
SQL> show parameter db_unique_name
- Listener port
- SYS password
- SYSMAN password
然后检查:
$emca -displayConfig dbcontrol –cluster
一切正常可以进入dbconsole了,但是进入后又碰到问题了:
显示: Dbconsole java.lang.Exception: Can't get Query Descriptor or Execution Descriptor
metalink给出了一个解决文档ID:352479.1
Solution
To implement the solution, please execute the following steps
on Both Nodes :
1. Stop the DBConsole
2. Change /sysman/admin/default_collection/rac_database.xml.
lines (59-62) from
to
3. Start the DBconsole and try again
至此问题全部解决。还真的感谢metalink.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/92530/viewspace-402627/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/92530/viewspace-402627/