Oracle
Tips/Questions and Answers:
|
More Resources by
Google: |
|
|
|
|
Question: I installed agent on one of my server but when I start it I get the following error messages:
replica6-replica:</u01/oracle/product/agent/agent10g/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 /u01/oracle/product/agent/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(<agent_name>, <new_tz_rgn>) to get the value
propagated to repository.
Consult the log files in: /u01/oracle/product/agent/agent10g/sysman/log
And when I try to reset the time zone, I get the following error message:
replica6-replica:</u01/oracle/product/agent/agent10g/bin> $emctl resetTZ agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Updating /u01/oracle/product/agent/agent10g/sysman/config/emd.properties...
----- Tue May 8 11:33:29 2007::tzOffset for US/East-Indiana is -300(min), but agent is runnning with tzOffset -240(min)
----- Tue May 8 11:33:29 2007::trying again after waiting for 1 sec to account for daylight transition
----- Tue May 8 11:33:29 2007::tzOffset for US/East-Indiana is -300(min), but agent is runnning with tzOffset -240(min)
-----
resetTZ failed.
The agentTZRegion in:
/u01/oracle/product/agent/agent10g/sysman/config/emd.properties
is not in agreement with what the agent thinks it should be.
Fix your environment.
Pick a TZ value that corresponds to time zone settings listed
in: /u01/oracle/product/agent/agent10g/sysman/admin/supportedtzs.lst
Please help.
Answer:
Your agent is not running with the correct time zone or it is not matching what you have in OMS repository.
Please do the following:
Go to the OMS repository and login as sysman and query the following SQL statement.
SQL> SELECT target_name FROM mgmt_targets;
Find exact sever name and then query the following SQL statement.
SQL> SELECT timezone_region FROM mgmt_targets
SQL> WHERE target_name like '<your server-name>';
TIMEZONE_REGION
----------------------------------------------------------------
Etc/GMT+4
Now, you should manually change the time zone in the emd.properties file in the sysman/config directory. To do that following the following steps:
1. Stop the agent
# cd $AGENT_HOME
# cd bin
# emctl stop agent
2. Open the File emd.properties, put the agentTZRegion=Etc/GMT+4 and save the file.
List of
Oracle Time Zone
# cd $AGENT_HOME
# cd sysman/config
# vi emd.properties -- add or change the time zone that you found from the OMS repository.
All the timezone are in the following place.
# cd sysman/admin
nsupportedtzs.lst
supportedtzs.lst
tzmappings.lst
3 . Now try to start the agent.
# cd $AGENT_HOME
# cd bin
# emctl start agent
-------------- OR --------------------
1. Stop the agent
# cd $AGENT_HOME
# cd bin
# emctl stop agent
2. Open the File emd.properties, make a note of agentTZRegion.
3. The go to the OMS repository and change the timezone to what you have in the emd.properties file.
# sqlplus /nolog
# SQL> connect sysman/<your password>
# SQL> exec mgmt_target.set_agent_tzrgn
# SQL> ('machine name :port number ','timezone that you found in
emd.properties');
If you don’t know the port number, you should find it in the emd.properties file.
4 . Now try to start the agent.
# cd $AGENT_HOME
# cd bin
# emctl start agent
If
you still getting the same error message:
Do
the following:
Set
the TZ to your-em-time-zone
Ex:
# TZ=GMT; export TZ
Go
to agent home/bin
Ex:
cd $AGENT_HOME/bin
Reset
time zone:
Ex:
# emctl resetTZ agent
Oracle
Enterprise Manager 10g Release 10.2.0.1.0.
Copyright
(c) 1996, 2005 Oracle Corporation. All rights reserved.
Updating
/u01/oracle/product/agent2/
agent10g/sysman/config/emd.
properties...
Successfully
updated /u01/oracle/product/agent2/
agent10g/sysman/config/emd.
properties.
Login as the em repository user and run the
script:
exec
mgmt_target.set_agent_tzrgn('
yourservername:3872','GMT')
This
can be done for example by logging into sqlplus and doing
SQL>
exec mgmt_target.set_agent_tzrgn('
yourservername:3872','GMT')
oradb1t-serv62:
/u01/oracle/product/agent2/
agent10g/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 ............. started.
Then
go to emd.properties to make sure the agentTZRegion parameter was changed.
Ex:
# more $AGENT_HOME/sysman/config/ emd.properties
You
should see: agentTZRegion=GMT
Go
to sqlplus and login as sysman in em repository and executed the above
procedure.
Ex: # sqlplus /nolog
# SQL> connect sysman/password
# SQL> exec mgmt_target.set_agent_tzrgn('
yourservername:3872','GMT');
Upload
agent to OEM.
Ex:
# emctl clearstate agent
# emctl upload agent
Good Luck!
|