Search Blog Post

Friday, January 24, 2014

Prerequisite Checks Failed while agent deployment EM12c

Problem:
Recently when I was trying to deploy management agent in Enterprise Manager  12c using "Add Targets Manually" , I was getting the below error.
Remote Prerequisite Checks Failed.
 
Possible Cause:
  • It seems I was trying to install agent on same OMS ( OEM12c R2 (12.1.0.2)) machine.
  • An EM agent home already exists on the host.
  • 11g and 12c Agents are already installed on the same server where we are trying to install 12c agent.
 Solution:
  • This is just a Warning Message, you can ignore and proceed with the new 12c Agent Installation; if the existing Agent is communicating with a different OMS. 
  • But as the  existing 12c agent is communicating with the same 12c OMS, so now I'm trying to deinstall the Oracle Management Agent home and retry the agent deployment part.
Prerequisites
Before you deinstall a Management Agent, do the following:
  • Shut down the Management Agent by running the following command from its home. If it is already shut down, then skip this step.
             $<AGENT_HOME>/bin/emctl stop agent
  •     Wait for the Management Agent to go to the unreachable state in the Cloud Control console. If it is already in the unreachable state, then go to the next step.
  •     Delete the Management Agent targets and their monitored targets (from any host where EM CLI is installed):
    emcli delete_target
    -name="example.com:1836"
    -type="oracle_emd"
    -delete_monitored_targets

There are 4 ways to deinstall Oracle Management agent, I will be discussing the one which is most recommended and highly used:
 
1. Using the AgentDeinstall.pl Script
2. Using the Installation Wizard in Graphical Mode
3. Using the Installation Wizard in Silent Mode
4. Using an RPM File

Deinstalling Oracle Management Agents Using the Installation Wizard in Graphical Mode
 

          1. Go to the agent home directory and invoke OUI(installer)
                cd $AGENT_HOME/oui/bin
./runInstaller.sh -deinstall ORACLE_HOME=<absolute_path_to_agent_home> [-removeallfiles] 
          2. In the installation wizard, click Installed Products.  
          3. On the Inventory screen, select the plug-in homes under the required Management 
              Agent home, then click Remove. 
          4. On the Inventory screen, select the sbin12cX home, and click Remove. 
          5. On the Inventory screen, select the Management Agent, and click Remove. 
          6. Manually delete the agent base directory. For information on installation base directory.
                     For UNIX platforms: 
             rm -rf <absolute_path_to_agent_base_dir>

After deinstalling the Oracle Management Agent I was able to deploy the agent successfully.

References:
EM 12c: Troubleshooting 12c Management Agent Installation issues (Doc ID 1396675.1)

Wednesday, January 22, 2014

EM Configuration issue. $ORACLE_HOME/rhel.localdomain.net_orcl not found.

Problem:
Recently I installed RHEL 5 and Oracle Database 11gR2 (11.2.0.3) on a machine. After that I installed OEM12c R2 (12.1.0.2) without any issues.

Right after the Oracle installation, without having made any changes, I typed:
cd $OMS_HOME/bin
$ ./emctl stop oms -all
 

and received the following error:

EM Configuration issue. /u01/app/oracle/product/11.2.0/db_1/rhel.localdomain.net_orcl not found.

I was able to correct the problem by doing the following:

cd $ORACLE_HOME
ln -s localhost_orcl rhel.localdomain.net_orcl
cd $ORACLE_HOME/oc4j/j2ee
ln -s OC4J_DBConsole_localhost_orcl OC4J_DBConsole_rhel.localdomain.net_orcl

Note: If the folder localhost_orcl doesn't lie in ORACLE_HOME location, you can simply create the folder with user who owns the database.

I can now use emctl to start and stop the OMS without trouble.

But the strange question is why did the Oracle installer use 'localhost_orcl' instead of 'rhel.localdomain.net_orcl'.
The service name I specified at the 'Desktop Class' installation in the OUI was 'rhel.localdomain.net' - it was printed already.
 I definitely did not change the host or domain name or made any changes to the hosts file, or any other changes at all

I tried to stop database and listner, than start database and listner and retest issue but still the issue persisted.

Solution:
So I would recommend in environment variable file set  ORACLE_HOSTNAME variable before invoking the OUI or when you run OUI environment variable, you can specify this hostname to avoid any problem.

./runInstaller -ORACLE_HOSTNAME=myhostname.mydomain

Note:Please be sure DO NOT SET ORACLE_HOME or ORACLE_SID before starting EM12c installation.
Now you should not see this issue.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
OC4J Configuration issue. /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_rhel.localdomain.net_orcl not found

For this error please try below command:

./emca -config dbcontrol db << it will ask u some questions liks sys user pass, lsnr port etc. please give correct value and retest issue
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Hope this helps..!!