Workaround to Grid Agent Restart Problem Due to a Daylight Savings Change

This note apply to Enterprise Manager Grid Control Version 10 to 11g

 

Oracle Management Agent does not start and show this error:

Starting agent …… failed.
The agentTZRegion value in /u01/app/oracle/product/grid11g/agent11g/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(<agent_name>, <new_tz_rgn>) to get the value propagated to repository.
Consult the log files in: /u01/app/oracle/product/grid11g/agent11g/sysman/log

When you run emctl resetTZ agent show :

tzOffset for US/Pacific is -480(min), but agent is runnning with tzOffset -420(min)

 

How to solve this problem ?

1. Verify and correct the date/timezone in O.S. and Hardware :
1.1 Verify O.S. using date :

$ date
Fri Oct 21 10:33:10 BRST 2011

1.2 Verify if hardware clock is syncronized using hwclock :

$ hwclock
Fri 21 Oct 2011 10:37:01 AM BRST  -0.497492 seconds

1.3 If you need correct the date use  “date MMDDhhmm”
1.4 If you need correct the hardware clock run with root  “hwclock –systohc” to syncronize.

 

2. Find in file  $AGENT_HOME/sysman/admin/supportedtzs.lst  your actual timezone and change to ETC :

E.g:  Find   “US/Pacific”   and verify that   “Etc/GMT+8”   is the same timezone “-08:00”
Follow bellow to change:

 

3. Edit emd.properties and modify the agent TZ at the end of the file :

E.g.:  agentTZRegion=Etc/GMT+8

 

4. Modify the timezone  of agent at database :

4.1 Login at database with sysdba :    sqlplus / as sysdba

4.2 Run MGMT_TARGET.SET_AGENT_TZRGN(‘<host>.<domain>:<port of agent>’,'<TZRegion>’)

alter session set current_schema = SYSMAN;
exec MGMT_TARGET.SET_AGENT_TZRGN(‘srv01.oracle.com:3872′,’Etc/GMT+8’);
commit;

 

5. Secure, clear and start agent :

cd $AGENT_HOME/bin
./emctl secure agent <password of sysman>
./emctl clearstate agent
./emctl start agent

 

6. Verify if agent is ok and try to upload data:

./emctl status agent
./emctl upload agent

Some times the agent stop and can not upload data because the agent is blocked, then you must login in grid enterprise and re-sync the agent and unblock it.

 

Good Luck !

Leave a Reply