GC启动 agent失败:时区不一致

时区问题

[oracle@ocm1 bin]$ ./emctl start agent

Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Starting agent ….. failed.
The agentTZRegion value in /oinstall/agent10g/agent10g/sysman/config/emd.properties is not in agreement with what agent thinks it should be.Please verify your environment to make sure that TZ setting has not changed since the last start of the agent.
If you modified the timezone setting in the environment, please stop the agent and exectute ‘emctl resetTZ agent’ and also execute the script mgmt_target.set_agent_tzrgn(, ) to get the value propagated to repository.
Consult the log files in: /oinstall/agent10g/agent10g/sysman/log

看到是因为时区的信息与配置文件中的不一致了,修改emd.properties中的时区与之前的时区一致,启动正常,时区的设置对于agent很重要,要是两者的时区不一致或没有,会导致agent无法上传文件信息。

问题原因:装系统时时区随意选择,导致时区不一致

解决方法
linux系统修改系统时间与时区
时区设置:
1、 tzselect:(root下操作)
执行tzselect命令–>选择Asia–>选择China–>选择east China - Beijing, Guangdong, Shanghai, etc–>然后输入1。
执行完tzselect命令选择时区后,时区并没有更改,
2、在命令最后提示你可以执行TZ=’Asia/Shanghai’; export TZ 并将这行命令添加到.bash_profile中,然后退出并重新登录。
[root@dg2 ~]# vi .bash_profile
TZ=’Asia/Shanghai’; export TZ
参考date命令看到的结果,最终时区显示为CST,即中国标准时间。
3、 修改配置文件来修改时区
修改/etc/sysconfig/clock
ZONE=Asia/Shanghai
4、rm /etc/localtime
5、链接到上海时区文件
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
执行完上述过程后,重启机器,即可看到时区已经更改。
6、[oracle@dg2 config]$ pwd
/u01/app/oracle/product/11.2.0/db_1/sysman/config
[oracle@dg2 config]$ cat emd.properties
**# PLEASE PUT THEM INTO PROPERTY SECTION (READ ONLY OR MODIFIABLE PROPS
################################**
altNmo=/u01/app/oracle/product/11.2.0/db_1/sysman/config/bin/recv
agentTZRegion=Asia/Shanghai
即时区的信息与配置文件中的一致
dg1如dg2一样
所有的时区保持一致,则重启agent
[oracle@ocm1 bin]$ ./emctl start agent
就不会报错了

猜你喜欢

转载自blog.csdn.net/weixin_42859372/article/details/81637849