Reset Agent TimeZone

References

Oracle® Enterprise Manager Administration 10g Release 5 (10.2.0.5)

Overview

After upgrading a 10.2.0.1 EM Agent to 10.2.0.5, I got timezone errors in the emagent.trc file. I used emctl resetTZ agent to fix the problem.

Analysis

Contents of emagent.trc

The log, /u00/app/oracle/agent10g/sysman/log/emagent.trc showed the following errors when I tries to start the agent after applying patch, 3731593 (Grid Control 10.2.0.5), to the OMA:

2012-01-31 18:02:46,099 Thread-12512032 ERROR pingManager: OMS decided to shutdown the agent because of the following reason sent from OMS: AGENT_TZ_MISMATCH

2012-01-31 18:02:46,147 Thread-12512032 ERROR : Signalled to Exit with status 55. OMS requested shutdown

2012-01-31 18:02:46,147 Thread-12512032 ERROR pingManager: Did not receive valid response to ping "SHUTDOWN AGENT_TZ_MISMATCH"

Procedure

Reset TimeZone on Client

Followed the procedure in Changing the Management Agent Time Zone. Ran the following command on the client (bankstown.yaocm.id.au) to reset the timezone for the OMA:

[oracle@bankstown bin]$ emctl resetTZ agent Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0. Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. Updating /u00/app/oracle/agent10g/sysman/config/emd.properties... Successfully updated /u00/app/oracle/agent10g/sysman/config/emd.properties. Login as the em repository user and run the script: exec mgmt_target.set_agent_tzrgn('bankstown.yaocm.id.au:3872','Australia/Sydney') and commit the changes This can be done for example by logging into sqlplus and doing SQL> exec mgmt_target.set_agent_tzrgn('bankstown.yaocm.id.au:3872','Australia/Sydney') SQL> commit

Update the Respository Definitions

Ran the following commands on the OMS server (gridctrl.yaocm.id.au) to update the OMR definition for the time zone used by the client:

[oracle@gridctrl ~]$ sqlplus sysman@repos SQL*Plus: Release 11.1.0.7.0 - Production on Tue Jan 31 03:23:59 2012 Copyright (c) 1982, 2008, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning option SQL> exec mgmt_target.set_agent_tzrgn('bankstown.yaocm.id.au:3872','Australia/Sydney') PL/SQL procedure successfully completed. SQL> commit; Commit complete.

Start the Agent

Ran the following commands on the OEM client (bankstown.yaocm.id.au) to start the OEM agent:

[oracle@bankstown bin]$ emctl start agent Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0. Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. Starting agent ....... started.

Agent Resynchronization on OEM

The Grid Control page for the agent says that the OMA is blocked and requires resynchronization:

Agent is blocked. Blocked reason is: Agent is out-of-sync with repository. This most likely means that the agent was reinstalled or recovered. Please contact an EM administrator to unblock the agent by performing an agent resync from the console.

Clicked the button to start the process.