安装oracle10g,启动oracle oem遇到的问题

启动oem命令: emctl start dbconsole

关闭oem命令: emctl stop dbconsole

查看oem状态命令 :   emctl status dbconsole

1) 启动oem,emctl start dbconsole
 报错:

   [oracle@node1 admin]$ emctl start dbcontrol
TZ set to PRC
EM Configuration issue. /oracle/product/10.2.0/db1/node1_orcl10g not found.

这是因为在安装oracle时没有安装oem,需要重装一下oem

oem的配置文件在 $ORACLE_HOME/主机名_数据库实例名,不存在说明你没有安装过oem。

重置oem命令如下:

[oracle@node1 db1]$ emca -config dbcontrol db -respos recreate
提示如下:

Enter the following information:
Database SID: orcl10g
Listener port number: 1521
Password for SYS user: 
Password for DBSNMP user: 
Password for SYSMAN user: 
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
即提示你输入 实例名,端口号(默认1521),sys用户密码,正确的话就可以重建oem啦。

结果报错了,没看清错误,就先 emctl stop dbconsole

然后继续重建,emca -config dbcontrol db -respos recreate

提示:SEVERE: Cannot start Database Control. The following ports are already in use: [EM agent port:3938].
    EM agent port 3938已经被占用了。

查看3938被谁占用,使用 netstat -apn 查看全部

1.查找被占用的端口
          netstat -tpln    看server端口使用情况
          netstat -tpln | grep 3938只查看端口3938的使用情况

 netstat -tln 查看端口使用情况,而netstat -tln | grep 8083 则是只查看端口8083的使用情况

看到第一行

Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name  
tcp        0      0 0.0.0.0:3938                0.0.0.0:*                   LISTEN      9894/emagent 

原来是被emagent  占用了, 先kill掉吧

kill -9 9894

继续重建 :emca -config dbcontrol db -respos recreate

 依然报错:

SEVERE: Error starting Database Control
Refer to the log file at /oracle/product/10.2.0/db1/cfgtoollogs/emca/orcl10g/emca_2013-08-03_02-35-15-PM.log for more details.
Could not complete the configuration. Refer to the log file at /oracle/product/10.2.0/db1/cfgtoollogs/emca/orcl10g/emca_2013-08-03_02-35-15-PM.log for more details.

错误日志的最后几行如下:

Starting Oracle Enterprise Manager 10g Database Control ..........................................................
................................... failed.
------------------------------------------------------------------
Logs are generated in directory /oracle/product/10.2.0/db1/node1_orcl10g/sysman/log

Aug 3, 2013 2:42:08 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /oracle/product/10.2.0/db1/bin/emctl start dbconsole
Aug 3, 2013 2:42:08 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database Control
Refer to the log file at /oracle/product/10.2.0/db1/cfgtoollogs/emca/orcl10g/emca_2013-08-03_02-35-15-PM.log for m
ore details.
Aug 3, 2013 2:42:08 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)

 查看 ORACLE_HOME/<hostname>_<SID>/sysman/log/emagent.trc文件有如下报错信息:

2013-08-03 14:38:43 Thread-4135085760 ERROR util.files: ERROR: nmeufis_new: failed in lfiopn on file: /oracle/prod
uct/10.2.0/db1/node1_orcl10g/sysman/emd/agntstmp.txt. error = 2 (No such file or directory)
2013-08-03 14:38:43 Thread-4135085760 ERROR ssl: Open wallet failed, ret = 28750
2013-08-03 14:38:43 Thread-4135085760 ERROR ssl: nmehlenv_openWallet failed
2013-08-03 14:38:43 Thread-4135085760 ERROR http: 6: Unable to initialize ssl connection with server, aborting con
nection attempt
2013-08-03 14:38:43 Thread-4135085760 ERROR pingManager: nmepm_pingReposURL: Cannot connect tohttps://node1:5500/
em/upload/: retStatus=-1

通过查询support发现是因为对于oracle 10.2 版本的oem因为The Root Certificate Authority (CA) expired on 31-DEC-2010 00:00:0 root授权信息过期导致,oracle官方给出的解决办法是打Patch 8350262,然后按照oracle给出的建议操作即可解决,

1) 下载patch包,有2个包,10.2.0.4和10.2.0.5的,我的版本是.5 ,所以下载.5的包上传到linux,并解压 unzip p8350262_10205_Generic.zip

2)     % cd <PATCH_TOP>/8350262

   %  opatch apply

 出现问题了,找不到opatch , 后来查了一下 opatch是oracle自己提供的打patch的程序,位置在 $oracle_home/OPatch目录下

 可以用 which opatch 看看路径中有没有, 如果没有 find . -name  opatch 查看  opatch 所在的目录,位置在 $oracle_home/OPatch目录下

进入oracle 主目录 , vi .bash_profile

修改 export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

保存退出, 执行  source .bash_profile 使path生效, 执行 which  opatch , 显示

[oracle@node1 ~]$ which opatch
/oracle/product/10.2.0/db1/OPatch/opatch
执行 %  opatch apply

显示执行成功,

Files check OK: Files from Patch ID 8350262 are present in Oracle Home.

OPatch succeeded.


3) 执行目录下的 ./killDBConsole
4) $ emctl secure dbconsole -reset
5)  emctl start dbconsole 或者

 

oracle给出的问题现象和解决方法如下: 

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.4 to 10.2.0.5 - Release: 10.2 to 10.2
Oracle Database Configuration Assistant - Version: 10.2.0.4 to 10.2.0.5   [Release: 10.2 to 10.2]
Information in this document applies to any platform.
Enterprise Manager Database Control 10.2.0.4 and 10.2.0.5

Purpose

What is the Issue?

In Enterprise Manager Database Control with Oracle Database 10.2.0.4 and 10.2.0.5, the root certificate used to secure communications via the Secure Socket Layer (SSL) protocol will expire on 31-Dec-2010 00:00:00. The certificate expiration will cause errors if you attempt to configure Database Control on or after 31-Dec-2010. Existing Database Control configurations are not impacted by this issue.

If you plan to configure Database Control with either of these Oracle Database releases, Oracle strongly recommends that you applyPatch 8350262 to your Oracle Home installations before you configure Database Control. Configuration of Database Control is typically done when you create or upgrade Oracle Database, or if you run Enterprise Manager Configuration Assistant (EMCA) in standalone mode.

Note the following:

  • The issue impacts configuration of Database Control with Oracle Database 10.2.0.4 and 10.2.0.5 only. It does not impact database creation or upgrade.
  • The issue does not impact existing Database Control configurations.
  • Application of Patch 8350262 does not require any database downtime
Note: If you apply Patch 8350262 to your Oracle Home installations before you configure Database Control, you will not need to follow the recovery steps outlined in this document.

 

Scope and Application

Who is Affected?

If you did not apply Patch 8350262 before configuring Database Control, you will encounter errors during the Database Control configuration process on or after 31-Dec-2010 under the following conditions:

  • When configuring Database Control while installing Oracle Database 10.2.0.4 or 10.2.0.5 using Database Configuration Assistant (DBCA)
  • When configuring Database Control while upgrading to Oracle Database 10.2.0.4 or 10.2.0.5 on a new or existing Oracle Home using Database Upgrade Assistant (DBUA)
  • When configuring or re-configuring Database Control for Oracle Database 10.2.0.4 or 10.2.0.5 on an existing Oracle Home using Database Configuration Assistant (DBCA) or Enterprise Manager Configuration Assistant (EMCA)

Enterprise Manager Database Control Configuration - Recovering From Errors Due to CA Expiry on Oracle Database 10.2.0.4 or 10.2.0.5 [Video]

Video -How to recover from Database Control configuration errors due to CA Expiry on Oracle Database 10.2.0.4 or 10.2.0.5 (05:26)

What Happens During Database Control Configuration Failure?

Database Configuration Assistant (DBCA) and Database Upgrade Assistant (DBUA) Errors

Database Configuration Assistant (DBCA) and Database Upgrade Assistant (DBUA) will report the followingerror in the console:

Could not complete the Enterprise Manager configuration.
Enterprise manager configuration failed due to the following error:
Error starting Database Control

 

Enterprise Manager Configuration Assistant (EMCA) Errors

Enterprise Manager Configuration Assistant (EMCA) will write errors similar to those below to the emca.log file:


CONFIG: Securing Database Control completed successfully .
Jan 2, 2011 7:22:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
Jan 2, 2011 7:22:47 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jan 2, 2011 7:22:47 PM oracle.sysman.emcp.util.PlatformInterface addEnvVarToList
CONFIG: Value for env var 'ORACLE_HOSTNAME' is '', discarding the same
CONFIG: Returning env array from cache
Jan 2, 2011 7:22:47 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Starting execution: /myhost/bin/emctl start dbconsole
Jan 2, 2011 7:27:26 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Exit value of 1
Jan 2, 2011 7:27:26 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://myhost:5501/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control
............................................................................................. failed.
------------------------------------------------------------------
Logs are generated in directory /myhost/sysman/log
Jan 2, 2011 7:27:26 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /myhost/bin/emctl start dbconsole
Jan 2, 2011 7:27:26 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database Control
Refer to the log file at /myhost/dbua/d4/upgrade/emConfig.log for more details.
Jan 2, 2011 7:27:26 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
at oracle.sysman.emcp.EMDBPostConfig.performUpgrade(EMDBPostConfig.java:763)
at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:232)
at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:436)
at oracle.sysman.assistants.util.em.EMConfigStep.executeImpl(EMConfigStep.java:140)
at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
at oracle.sysman.assistants.util.step.BasicStep.callStep(BasicStep.java:251)
at oracle.sysman.assistants.dbma.backend.EMConfigStep.executeStepImpl(EMConfigStep.java:104)
at oracle.sysman.assistants.dbma.backend.SummarizableStep.executeImpl(SummarizableStep.java:175)
at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
at oracle.sysman.assistants.util.step.Step.execute(Step.java:140)
at oracle.sysman.assistants.util.step.StepContext$ModeRunner.run(StepContext.java:2488)
at java.lang.Thread.run(Thread.java:534)


The EMCA console will display output similar to the following:

aime@myhost09 db_1]$ bin/emca -config dbcontrol db -repos recreate -cluster
STARTED EMCA at Jan 11, 2011 4:11:01 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database unique name: catest
Database Control is already configured for the database catest
You have chosen to configure Database Control for managing the database catest

This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener port number: 1521
Cluster name: mycluster
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):

........

Jan 11, 2011 4:18:05 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jan 11, 2011 4:19:31 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jan 11, 2011 4:28:38 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database Control
Refer to the log file at /myhost/oracle/product/10.2.0/db_1/cfgtoollogs/emca/catest/emca_2011-01-11_
04-11-01-PM.log for more details.
Could not complete the configuration. Refer to the log file at /myhost/oracle/product/10.2.0/db_
1/cfgtoollogs/emca/catest/emca_2011-01-11_04-11-01-PM.log for more details.


Checking the ORACLE_HOME\<hostname>_<SID>\sysman\log\emagent.trc, one can see also:

2011-01-09 09:36:56 Thread-51125136 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://myhost:1158/em/upload/: retStatus=-1
2011-01-09 09:36:56 Thread-51125136 ERROR ssl: Open wallet failed, ret = 28750
2011-01-09 09:36:56 Thread-51125136 ERROR ssl: nmehlenv_openWallet failed
2011-01-09 09:36:56 Thread-51125136 ERROR http: 15: Unable to initialize ssl connection with server, aborting connection attempt


Also, the following errors has been reported in some cases:

2011-01-06 18:50:54 Thread-3393 ERROR ssl: nzos_Initialize failed, ret = 43061
2011-01-06 18:50:54 Thread-3393 ERROR http: 14: Unable to initialize ssl connection with server, aborting connection attempt
2011-01-06 18:50:54 Thread-3393 ERROR pingManager: nmepm_pingReposURL: Cannot connect tohttps://myhost:1158/em/upload/:retStatus=-1


At the end of the database installation on non-Windows platforms, both Database Control and the Management Agent will be up and running, even though the status of both components will be shown as not running, because EMCTL will be unable to connect to the dbconsole process. In addition, Database Control will fail to connect to the Agent.

Note for Windows Platform Only:

On Windows, the dbconsole process will be stopped after the failed configuration attempt. Note that the tool used to perform Database Control configuration (DBUA, DBCA or EMCA) will also wait for 15 minutes for Database Control to start, then time out.


The output of the "emctl status dbconsole" command incorrectly returns the status of Database Control, as shown below (note that this command may take a while to complete, especially in a RAC environment) :

$ ./emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
https://myhost:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.


The output of the "emctl status agent" command incorrectly returns the status of the Agent, as shown
below:

$ ./emctl status agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent is Not Running

 

Recovering from Configuration Errors on a Single Instance Database

1. Ignore any errors and continue with the installation or upgrade. The database will be created without errors.

2. Apply Patch 8350262 to your Oracle Home installation using OPatch. The patch is also included in 10.2.0.5 database patch 5 and 10.2.0.5.3 (PSU3).

NOTE:   The database instance and the listener DO NOT have to be stopped for applying this patch, but ensure that all java processes sourced from the Oracle Home being patached are stopped in this case (i.e., all Oracle Home-related java.exe on Windows, for instance).

opatch apply

Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.

Oracle Home : /myhost
Central Inventory : /oracle/inv/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /myhost/oui
Log file location : /myhost/cfgtoollogs/opatch/opatch2011-01-02_11-00-00AM.log

ApplySession applying interim patch '8350262' to OH '/myhost'

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.4.0a...
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
java.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/myhost/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.


3. After applying the patch, force stop the Database Control (dbconsole) process using the killDBConsole script bundled with the patch. Note that the dbconsole process cannot be stopped using the emctl stop dbconsole command, as EMCTL is unable to connect to the process.

To execute the killDBConsole script:

  • Set the ORACLE_HOME and ORACLE_SID environment variables.
  • Execute <PATCH_HOME>/killDBConsole.
Note for Windows Platform Only:

It is not necessary to force stop the dbconsole process on the Windows platform, because the process will
already be in a stopped state at the end of the failed configuration attempt.


The killDBConsole script output is shown below:

$ <PATCH_HOME>/killDBConsole
ORACLE_HOME=/oracle/db_1
ORACLE_SID=mysid
State directory = /oracle/db_1/myhost_mysid
WatchDog PID = 802932
DBconsole PID = 577716
EMAgent PID = 512156
Killing WatchDog (pid=802932) ...
Successfully killed process 802932
Killing DBConsole (pid=577716) ...
Successfully killed process 577716
Killing EMAgent (pid=512156) ...
Successfully killed process 512156


4. Re-secure Database Control with the following command:

<ORACLE_HOME>/bin/emctl secure dbconsole -reset

You will be prompted twice to confirm that the Root key must be overwritten. In both cases, enter upper-case "Y" as the response. Any other response (including lower-case "y") will cause the command to terminate without completing. If this happens, the command can be re-invoked.

 

$ ./emctl secure dbconsole -reset
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://myhost:5501/em/console/aboutApplication
Enter Enterprise Manager Root Password :
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Securing dbconsole... Started.
Checking Repository... Done.
Checking Em Key... Done.
Checking Repository for an existing Enterprise Manager Root Key...
WARNING! An Enterprise Manager Root Key already exists in
the Repository. This operation will replace your Enterprise
Manager Root Key.
All existing Agents that use HTTPS will need to be
reconfigured if you proceed. Do you wish to continue and
overwrite your Root Key
(Y/N) ?
Y
Are you sure ? Reset of the Enterprise Manager Root Key
will mean that you will need to reconfigure each Agent
that is associated with this OMS before they will be
able to upload any data to it. Monitoring of Targets
associated with these Agents will be unavailable until
after they are reconfigured.
(Y/N) ?
Y
Generating Enterprise Manager Root Key (this takes a minute)... Done.Fetching Root Certificate from
the Repository... Done.
Updating HTTPS port in emoms.properties file... Done.
Generating Java Keystore... Done.
Securing OMS ... Done.
Generating Oracle Wallet Password for Agent.... Done.
Generating wallet for Agent ... Done.
Copying the wallet for agent use... Done.
Storing agent key in repository... Done.
Storing agent key for agent ... Done.
Configuring Agent...
Configuring Agent for HTTPS in DBCONSOLE mode... Done.
EMD_URL set in /oracle/db_1/sysman/config/emd.properties
Done.
Configuring Key store.. Done.
Securing dbconsole... Sucessful.


5. Re-start Database Control with the following command:

<ORACLE_HOME>/bin/emctl start dbconsole

Recovering from Configuration Errors in an Oracle Real Application Clusters (RAC) Environment

1. Ignore any errors and continue with the upgrade, so that the database is upgraded without errors.

2. Apply Patch 8350262 to your Oracle Home installation. Note that the OPatch utility will apply the patch to all nodes in the cluster, as shown below:

../OPatch/opatch apply
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.

Oracle Home : /myhost/oracle/product/10.2.0/db_1
Central Inventory : /myhost/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /myhost/oracle/product/10.2.0/db_1/oui
Log file location : /myhost/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-01-01_
21-30-27PM.log

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

Running prerequisite checks...

OPatch detected the node list and the local node from the inventory. OPatch will patch the local
system then propagate the patch to the remote nodes.

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.4.0a...
Updating jar file "/myhost/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 "/myhost/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 "/myhost/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 "/myhost/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 "/myhost/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 "/myhost/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 "/myhost/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 "/myhost/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.

Patching in rolling mode.

Updating nodes 'myhost'
Apply-related files are:
FP = :/myhost/oracle/product/10.2.0/db_1/.patch_storage/8350262_Sep_14_2010_04_59_44/rac/copy_files.txt"
DP = "/myhost/oracle/product/10.2.0/db_1/.patch_storage/8350262_Sep_14_2010_04_59_44/rac/copy_dirs.txt"
MP = "/myhost/oracle/product/10.2.0/db_1/.patch_storage/8350262_Sep_14_2010_04_59_44/rac/make_cmds.txt"
RC = "/myhost/oracle/product/10.2.0/db_1/.patch_storage/8350262_Sep_14_2010_04_59_44/rac/remote_cmds.txt"

Instantiating the file "/myhost/oracle/product/10.2.0/db_1/.patch_storage/8350262_Sep_14_2010_04_59_
44/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/myhost/oracle/product/10.2.0/db_
1/.patch_storage/8350262_Sep_14_2010_04_59_44/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...
Instantiating the file "/myhost/oracle/product/10.2.0/db_1/.patch_storage/8350262_Sep_14_2010_04_59_
44/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/myhost/oracle/product/10.2.0/db_
1/.patch_storage/8350262_Sep_14_2010_04_59_44/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...

OPatch succeeded.


3. After applying the patch, force stop the Database Control (dbconsole) process by executing the
killDBConsole script bundled with the patch on each node in the cluster. Note that the dbconsole
process cannot be stopped using the emctl stop dbconsole command, as EMCTL is unable to connect
to the process.

To execute the killDBConsole script:

  • Set the ORACLE_HOME and ORACLE_SID environment variables.
  • Execute <PATCH_HOME>/killDBConsole
Note for Windows Platform Only:
It is not necessary to force stop the dbconsole process on the Windows platform, because the process will
already be in a stopped state at the end of the failed configuration attempt.


The killDBConsole script output is shown below:

$ <PATCH_HOME>/killDBConsole
ORACLE_HOME=/u01/oracle/db_1
ORACLE_SID=mysid
State directory = /u01/oracle/db_1/myhost_mysid
WatchDog PID = 802932
DBconsole PID = 577716
EMAgent PID = 512156
Killing WatchDog (pid=802932) ...
Successfully killed process 802932
Killing DBConsole (pid=577716) ...
Successfully killed process 577716
Killing EMAgent (pid=512156) ...
Successfully killed process 512156



NOTE:   The following is a REQUIRED STEP!

4. Re-secure Database Control on the first cluster node with the following command:

<ORACLE_HOME>/bin/emctl secure dbconsole -reset

You will be prompted twice to confirm that the Root key must be overwritten. In both cases, enter upper-case "Y" as the response. Any other response (including lower-case "y") will cause the command to terminate without completing. If this happens, the command can be re-invoked.

$ ./emctl secure dbconsole -reset
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://myhost:5501/em/console/aboutApplication
Enter Enterprise Manager Root Password :
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Securing dbconsole... Started.
Checking Repository... Done.
Checking Em Key... Done.
Checking Repository for an existing Enterprise Manager Root Key...
WARNING! An Enterprise Manager Root Key already exists in
the Repository. This operation will replace your Enterprise
Manager Root Key.
All existing Agents that use HTTPS will need to be
reconfigured if you proceed. Do you wish to continue and
overwrite your Root Key
(Y/N) ?
Y
Are you sure ? Reset of the Enterprise Manager Root Key
will mean that you will need to reconfigure each Agent
that is associated with this OMS before they will be
able to upload any data to it. Monitoring of Targets
associated with these Agents will be unavailable until
after they are reconfigured.
(Y/N) ?
Y
Generating Enterprise Manager Root Key (this takes a minute)... Done.Fetching Root Certificate from
the Repository... Done.
Updating HTTPS port in emoms.properties file... Done.
Generating Java Keystore... Done.
Securing OMS ... Done.
Generating Oracle Wallet Password for Agent.... Done.
Generating wallet for Agent ... Done.
Copying the wallet for agent use... Done.
Storing agent key in repository... Done.
Storing agent key for agent ... Done.
Configuring Agent...
Configuring Agent for HTTPS in DBCONSOLE mode... Done.
EMD_URL set in /myhost/sysman/config/emd.properties
Done.
Configuring Key store.. Done.
Securing dbconsole... Sucessful.


5. Re-secure Database Control on the remaining cluster nodes with the following command. Note that the -reset switch is not included with this command:

<ORACLE_HOME>/bin/emctl secure dbconsole

(Note:   the "Enter Enterprise Manager Root Password :" value is that for sysman)

[myhost bin]$ ./emctl secure dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://myhost:1158/em/console/aboutApplication
Enter Enterprise Manager Root password :
Enter a Hostname for this OMS : myhost
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Securing dbconsole... Started.
Checking Repository... Done.
Checking Em Key... Done.
Checking Repository for an existing Enterprise Manager Root Key... Done.
Fetching Root Certificate from the Repository... Done.
Updating HTTPS port in emoms.properties file... Done.
Generating Java Keystore... Done.
Securing OMS ... Done.
Generating Oracle Wallet Password for Agent.... Done.
Generating wallet for Agent ... Done.
Copying the wallet for agent use... Done.
Storing agent key in repository... Done.
Storing agent key for agent ... Done.
Configuring Agent...
Configuring Agent for HTTPS in DBCONSOLE mode... Done.
EMD_URL set in /myhost/oracle/product/10.2.0/db_1/myhost/sysman/c
onfig/emd.properties
Done.
Configuring Key store.. Done.
Securing dbconsole... Sucessful.


6. Re-start Database Control by executing the following command on each node in the cluster:

<ORACLE_HOME>/bin/emctl start dbconsole

 

 

出现的问题1:报时区不对,具体描述如下:

emctl start dbconsole

TZ set to US/Pacific
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication

Timezone mismatch: The agentTZRegion value (GMT) in
 /u01/app/oracle/oracle/product/10.2.0/db_4/localhost.localdomain_orcl/sysman/config/emd.properties
does not match the current environment TZ setting(US/Pacific).
The dbconsole cannot run with this mismatch.

If GMT is the correct timezone, set your timezone environment variable to GMT and repeat the 'emctl start dbconsole' operation.

If GMT is not the correct timezone, make sure that the timezone in your environment is correct, and then run the following command in your local Oracle Home: 'emctl resetTZ agent'

The output of this command will include detailed instructions to follow, to correct the mismatch.


解决方法1:

切换到root下
修改
vi
/u01/app/oracle/oracle/product/10.2.0/db_4/localhost.localdomain_orcl/sysman/config/emd.properties

在最后一行添加 agentTZRegion=Asia/Shanghai


修改 /etc/sysconfig/clock 文件

添加 ZONE="Asia/Shanghai"




 
方法2:

[oracle@localhost bin]$ export TZ=RPC
[oracle@localhost bin]$ emctl config agent getTZ
[oracle@localhost bin]$ emctl config agent updateTZ
[oracle@localhost bin]$ emctl start agent
[oracle@localhost bin]$ emctl start dbconsole

代码如下所示:

[oracle@localhost bin]$  export TZ=RPC
[oracle@localhost bin]$  emctl config agent getTZ
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
GMT
[oracle@localhost bin]$ emctl config agent updateTZ
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
[oracle@localhost bin]$ emctl start agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Starting agent .... started.
[oracle@localhost bin]$ emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Agent Version     : 10.1.0.4.1
OMS Version       : Unknown
Protocol Version  : 10.1.0.2.0
Agent Home        : /u01/app/oracle/oracle/product/10.2.0/db_4/localhost.localdomain_orcl
Agent binaries    : /u01/app/oracle/oracle/product/10.2.0/db_4
Agent Process ID  : 26061
Parent Process ID : 26054
Agent URL         : http://localhost.localdomain:3938/emd/main
Started at        : 2012-10-28 10:48:57
Started by user   : oracle
Last Reload       : 2012-10-28 10:48:57
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far :     0.00
Number of XML files pending upload           :        3
Size of XML files pending upload(MB)         :     0.01
Available disk space on upload filesystem    :    39.80%
Agent is already started. Will restart the agent
Stopping agent .... stopped.
Starting Oracle Enterprise Manager 10g Database Control ...................... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/oracle/product/10.2.0/db_4/localhost.localdomain_orcl/sysman/log
[oracle@localhost bin]$


到这里,已经可以再浏览器里看到oem界面了,可是关闭的时候却又错了

[oracle@localhost ~]$ emctl stop dbconsole
TZ set to US/Pacific
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
--- Failed to shutdown DBConsole Gracefully ---
 failed.

解决办法:杀掉oc4j 和dbconsole进程,然后就可以了

[oracle@localhost ~]$ ps -ef|grep oc4j
oracle     535 31048  0 04:05 pts/3    00:00:00 grep oc4j
[oracle@localhost ~]$ ps -ef|grep dbconsole
oracle     609 31048  0 04:06 pts/3    00:00:00 grep dbconsole

[oracle@localhost ~]$ emctl stop dbconsole
TZ set to US/Pacific
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
 ...  Stopped.

ok  问题都解决了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值