Issue :
EMAGENT agent is
showing down
C:\Oracle\Middleware\asinst_1\bin>opmnctl.bat
status -l
Error Observed:
In
$INSTANCE_HOME/EMAGENT/EMAGENT/sysman/log/emagent.nohup files below error was
observed:
<<
----- Tue Sep 8 07:57:18 2015::Mismatch
detected between timezone in env (Asia/*****) and in
C:\Oracle\Middleware\asinst_1\EMAGENT\EMAGENT/sysman/config/emd.properties
(America/Los_Angeles). Forcing value to latter.. -----
----- Tue Sep 8 07:57:18 2015::The
agentTZRegion value in
C:\Oracle\Middleware\asinst_1\EMAGENT\EMAGENT/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 -----
--- Shared agent
----- Tue Sep 8 07:57:23 2015::tzOffset
for America/Los_Angeles is -420(min), but agent is runnning with
tzOffset 180(min)
-----
----- Tue Sep 8 07:57:23 2015::trying
again after waiting for 1 sec to account for daylight transition
>>
Timezone used in emd.properties at C:\Oracle\Middleware\asinst_1\EMAGENT\EMAGENT\sysman\config was
"agentTZRegion=America/Los_Angeles"
which was not matching with OS time zone(Asia/*****)
where *****=country name
Solution:
1) Execute below command from prompt or shell :
export TZ=UTC+3 (Unix)
set TZ=UTC+3 (Windows)
2) $INSTANCE_HOME/EMAGENT/EMAGENT/bin/emctl
resetTZ agent
In the output of above command you will
also see the exact parameters that you will have to use with the next
command from SQL.
3) Login using SQLPlus as the em
repository user(mostly SYSMAN) and run the script:
SQL> exec mgmt_target.set_agent_tzrgn('agentname','UTC+3')
4) Commit the changes
SQL> exec mgmt_target.set_agent_tzrgn('agentname','UTC+3')
4) Commit the changes
SQL> commit
Example:
1) C:\Users\Administrator>set
TZ=UTC+3
2) C:\Users\Administrator>cd
C:\Oracle\Middleware\asinst_1\EMAGENT\EMAGENT\bin
C:\Oracle\Middleware\asinst_1\EMAGENT\EMAGENT\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
C:\Oracle\Middleware\asinst_1\EMAGENT\EMAGENT/sysman/config/emd.properties...
Successfully updated
C:\Oracle\Middleware\asinst_1\EMAGENT\EMAGENT/sysman/config/emd.properties.
Login as the em repository user and run
the script:
exec
mgmt_target.set_agent_tzrgn('agentName','Asia/*****')
and commit the changes
This can be done for example by logging
into sqlplus and doing
Note: In place of agentName,you will
get agent name of your agent(as per your env), so replace that and execute below command.
3) SQL> exec
mgmt_target.set_agent_tzrgn('agentName','Asia/Riyadh')
4) SQL> commit
5) C:\Oracle\Middleware\asinst_1\bin>opmnctl.bat startall
6) C:\Oracle\Middleware\asinst_1\bin>opmnctl.bat
status -l
No comments:
Post a Comment