Agent Startup Fails When the Repository DB Does Not Support TZ of Agent-332131.1

rongshiyuan發表於2013-06-22
Grid Control Agent Startup Fails When the Repository Database Does Not Support the Timezone of the Agent [ID 332131.1]
 

In this Document
Symptoms
Cause
Solution
References


Applies to:

Enterprise Manager Grid Control - Version: 10.1.0.4 to 10.2.0.5 - Release: 10.1 to 10.2
Information in this document applies to any platform.

Symptoms

The Grid Agent fails to start with the following error in the /sysman/log/emagent.trc file:

Thread-2904 ERROR main: EMAgent abnormal terminating
Thread-972 ERROR pingManager:
OMS does not understand the
timezone region of the agent. Either start the OMS using the extended list of
time zones supported by the database or pick a value of time zone
from U:
\oracle\product\10.1.0\em_1\sysman\admin\nsupportedtzs.lst , update the
property 'agentTZRegion' in the file U:\oracle\product\10.1.0\em_1\sysman\config\emd.properties and restart the agent.A value which is
around an offset of -04:00 from GMT should be picked.
Thread-972 ERROR : Signalled to Exit with status 55
Thread-972 ERROR pingManager: Did not receive valid
response to ping, ignoring

The /sysman/log/emagent/nohup shows a similar error:

----- ::Agent Only Monitor. -----
----- ::Agent Launched with PID 2158816 at time -----
(pid=2158816): starting emagent version 10.1.0.3.0
OMS does not understand the timezone region of the agent. Either start the OMS using the extended list of time zones supported by the database or pick a value of time zone from /sysman/admin/nsupportedtzs.lst , update the property 'agentTZRegion' in the file /sysman/config/emd.properties and restart the agent.A value which is around an offset of +02:00 from GMT should be picked.(pid=2158816): emagent now exiting abnormally - initialization failure. Consult '.trc' and '.log' files.
----- ::EMAgent exited at Wed Oct 5 10:06:20 2005 with return value 55.-----
----- ::EMAgent has exited due to initialization failure. -----
----- ::Stopping other components. -----
----- ::Commiting Process death. -----
----- ::Exiting watchdog loop -----

Cause

The Timezone used by the Grid Agent is not supported / Recognized by Repository Database. The Agent Timezone can be obtained from the value of the agentTZRegion parameter in the /sysman/config/emd.properties file file.

To check the Timezones supported by the Repository Database, login to the Database as a DBA user and execute:

SQL> SELECT TZname, TzAbbrev FROM V$TIMEZONE_NAMES ORDER BY TzAbbrev;

If you do not find the Timezone used by the Agent in the output of the above SQL statement, then the Agent will not start.

Solution

Fix 1:

- Stop the Agent:

cd /bin
emctl stop agent

- Set the environment variable TZ to a valid Time Zone which is recognised by your Repository Database and also present in the /sysman/admin/nsupportedtzs.lst file.

$ export ORACLE_HOME=
$ export PATH=$ORACLE_HOME/bin:$PATH
$ cd $ORACLE_HOME/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 /home/em/oracle/gc102/agent10g/sysman/config/emd.properties...
Successfully updated /home/em/oracle/gc102/agent10g/sysman/config/emd.properties.
Login as the em repository user and run the script.
exec mgmt_target.set_agent_tzrgn('agentmachine.domain:3872','Asia/Calcutta')
and commit the changes
This can be done for example by logging into sqlplus and doing
SQL> exec mgmt_target.set_agent_tzrgn('agentmachine.domain:3872','Asia/Calcutta')
SQL> commit

DO NOT start the Agent yet!

- Login to the Repository database as the SYSMAN user and execute the SQL statements shown by the above command output:

SQL> exec mgmt_target.set_agent_tzrgn('','');
SQL> commit;

For example:
SQL> exec mgmt_target.set_agent_tzrgn('agentmachine.domain:3872','Asia/Calcutta')
SQL> commit

- After the Repository side routine has completed successfully, start the agent, and make sure it's uploading new data:

$ emctl start agent
$ emctl upload
$ emctl status agent

Fix 2:

1. If the Repository Database has been started with a small / basic timezone file, then switch to the large timezone file:

1. Shut down the database.
2. Set the ORA_TZFILE environment variable to the full path name of the large timezone file: $ORACLE_HOME/oracore/zoneinfo/timezlrg.dat

On Unix this needs to be a environment variable. On Windows, this needs to be set in the relevant HOME under HKEY_LOCAL_MACHINE/Software/Oracle in the registry.

3. Restart the database.

References

NOTE:340512.1 - Timestamps & time zones - Frequently Asked Questions

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-764612/,如需轉載,請註明出處,否則將追究法律責任。

相關文章