在linux下启动oracle oem和遇到的错误解决(时区问题和oem无法关闭)

启动oem命令: emctl start dbconsole

关闭oem命令: emctl stop dbconsole

查看oem状态命令 :   emctl status 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
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值