Today after OS patching, got below error when trying to check the status of the agent :-
==>./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD_URL is null.
Could not read EMD_URL from agent configuration files
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
EMD_URL is null.
Could not read EMD_URL from agent configuration files
Cause :-
Configuration files for Agent corrupted or accidentally deleted.
Solution :-
Check for the emd.properties file in EM_AGENT_HOME/agent_inst/sysman/config folder
or check for the targets.xml file in EM_AGENT_HOME/agent_inst/sysman/emd folder
In my scenario , my emd.properties got corrupted
==>ls -ltr emd*
-rw------- 1 oracle sigdba 7709 Jan 19 2016 emd.properties.tzbak
-rw-r----- 1 oracle sigdba 7709 Jan 19 2016 emd.properties.2016-01-19-21-51-32
-rw-r----- 1 oracle sigdba 7734 Jan 19 2016 emd.properties.2016_01_19_09_51_36
-rw-r----- 1 oracle sigdba 7861 Oct 29 01:59 emd.properties.bak
-rw-r----- 1 oracle sigdba 0 Dec 16 01:01 emd.properties
[Hostname][oracle][AMIT2]
We can see the size of file is zero , by default Oracle keeps a backup of emd.properties file in the same directory, restore the file from that backup, I did the same
-rw-r----- 1 oracle sigdba 7861 Oct 29 01:59 emd.properties
-rw-r----- 1 oracle sigdba 155 Oct 29 01:59 private.properties
-rw-r----- 1 oracle sigdba 265 Dec 16 01:01 autotune.properties
-rw-r----- 1 oracle sigdba 0 Dec 16 01:01 emd.properties_20170113
==>./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD_URL is null.
Could not read EMD_URL from agent configuration files
==>./emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 4Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
EMD_URL is null.
Could not read EMD_URL from agent configuration files
Cause :-
Configuration files for Agent corrupted or accidentally deleted.
Solution :-
Check for the emd.properties file in EM_AGENT_HOME/agent_inst/sysman/config folder
or check for the targets.xml file in EM_AGENT_HOME/agent_inst/sysman/emd folder
In my scenario , my emd.properties got corrupted
==>ls -ltr emd*
-rw------- 1 oracle sigdba 7709 Jan 19 2016 emd.properties.tzbak
-rw-r----- 1 oracle sigdba 7709 Jan 19 2016 emd.properties.2016-01-19-21-51-32
-rw-r----- 1 oracle sigdba 7734 Jan 19 2016 emd.properties.2016_01_19_09_51_36
-rw-r----- 1 oracle sigdba 7861 Oct 29 01:59 emd.properties.bak
-rw-r----- 1 oracle sigdba 0 Dec 16 01:01 emd.properties
[Hostname][oracle][AMIT2]
-rw-r----- 1 oracle sigdba 7861 Oct 29 01:59 emd.properties
-rw-r----- 1 oracle sigdba 155 Oct 29 01:59 private.properties
-rw-r----- 1 oracle sigdba 265 Dec 16 01:01 autotune.properties
-rw-r----- 1 oracle sigdba 0 Dec 16 01:01 emd.properties_20170113
Now again tried for a restart of the agent , it worked
==>./emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
Agent is Not Running
[Hostname][oracle][amit2]
/opt/oracle/product/agent/core/12.1.0.4.0/bin$
==>./emctl start agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
Starting agent ..................... started.
If your emd.properties file is not corrupted but targets.xml is corrupted , then also Oracle keep a backup of that file in same folder , we can restore from that file.
I hope this article helped you.
Thanks
Amit Rath
Thanks for the share,
ReplyDeleteFoued
and if the backup file is empty ...
ReplyDeleteThanks for this, It worked.
ReplyDelete