What to do with targets that have not been discovered



I was trying to manage my 11g Data Guard using the Enterprise Manager Grid Control Agent, but I had some hitches.
The management server had been installed on grid10g and the data guard pair on ha1 and ha2

The standby instance on ha2 is SBF1 and is up
ha2-> ps -ef | grep oracle
oracle    3978     1  0 12:18 ?        00:00:01 /opt/oracle/product/11g/db_1/bin/tnslsnr LISTENER_SBF1 -inherit
oracle    4016     1  0 12:19 ?        00:00:06 ora_pmon_SBF1
oracle    4018     1  0 12:19 ?        00:00:11 ora_vktm_SBF1
oracle    4022     1  0 12:19 ?        00:00:01 ora_diag_SBF1
oracle    4024     1  0 12:19 ?        00:00:00 ora_dbrm_SBF1
oracle    4026     1  0 12:19 ?        00:00:01 ora_psp0_SBF1
oracle    4030     1  0 12:19 ?        00:00:22 ora_dia0_SBF1
But the only target visible on ha2 is the host and the agent



Checking oratab I noticed an error

cat /etc/oratab
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
SBF1:opt/oracle/product/11g/db_1:Y
The slash before opt is missing, should be /opt

The question is now how to have the agent re-discover the targets on the node ha2;
I know that agentca is to be used (Agent Configuration Assistant)
ha2-> agentca

Either rediscover(-d) or reconfigure(-f) option is mandatory

Let's try -d ha2-> agentca -d
Stopping the agent using /oragrid/OracleHomes/agent10g/bin/emctl  stop agent 
Oracle Enterprise Manager 10g Release 10.2.0.1.0.  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Stopping agent ... stopped.
Running agentca using /oragrid/OracleHomes/agent10g/oui/bin/runConfig.sh 
ORACLE_HOME=/oragrid/OracleHomes/agent10g ACTION=Configure MODE=Perform RESPONSE_FILE=/oragrid/OracleHomes/agent10g/response_file
RERUN=TRUE INV_PTR_LOC=/oragrid/OracleHomes/agent10g/oraInst.loc COMPONENT_XML={oracle.sysman.top.agent.10_2_0_1_0.xml}
Perform - mode is starting for action: Configure

Perform - mode finished for action: Configure

ha2-> emctl status agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent is Not Running
ha2-> 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.

ha2-> cat /oragrid/OracleHomes/agent10g/sysman/emd/targets.xml
<Targets AGENT_TOKEN="18bcd1427584a9f57b95ef01a0b1245bc98dcb8b">
        <Target TYPE="oracle_emd" NAME="ha2:3872"/>
        <Target TYPE="host" NAME="ha2"/>
</Targets>
ha2-> ls -l /oragrid/OracleHomes/agent10g/sysman/emd/targets.xml
-rw-r----- 1 oracle dba 155 Jul 4 17:00 /oragrid/OracleHomes/agent10g/sysman/emd/targets.xml

The file targets.xml has been modified, but still no /opt/oracle/product/11g/db_1


ha2-> ls /oragrid/OracleHomes2/agent10g/network/admin
shrept.lst
ha2-> rm -rf /oragrid/OracleHomes2/agent10g/network/admin
ha2-> ln -s /opt/oracle/product/11g/db_1/network/admin  /oragrid/OracleHomes2/agent10g/network/admin                                           
ha2-> set -o vi
ha2-> ls /oragrid/OracleHomes2/agent10g/network/admin                                           
listener.ora  samples  shrept.lst  tnsnames.ora




ha2-> agentca -d                                                 

Stopping the agent using /oragrid/OracleHomes2/agent10g/bin/emctl  stop agent 
Oracle Enterprise Manager 10g Release 10.2.0.1.0.  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Agent is Not Running
Running agentca using /oragrid/OracleHomes2/agent10g/oui/bin/runConfig.sh 
ORACLE_HOME=/oragrid/OracleHomes2/agent10g ACTION=Configure MODE=Perform 
RESPONSE_FILE=/oragrid/OracleHomes2/agent10g/response_file 
RERUN=TRUE INV_PTR_LOC=/oragrid/OracleHomes2/agent10g/oraInst.loc COMPONENT_XML={oracle.sysman.top.agent.10_2_0_1_0.xml}
Perform - mode is starting for action: Configure


Perform - mode finished for action: Configure

You can see the log file: /oragrid/OracleHomes2/agent10g/cfgtoollogs/oui/configActions2009-07-05_11-46-05-AM.log

ha2-> cat /oragrid/OracleHomes2/agent10g/cfgtoollogs/oui/configActions2009-07-05_11-46-05-AM.log
Unable to complete request: Parameter id=b_isoneoffrequired was not found
in aggregate oracle.sysman.top.agent:10.2.0.1.1:common:family=CFM:oh=/oragrid/OracleHomes2/agent10g:label=1
oracle.sysman.emCfg.common.CfwException: Parameter id=b_isoneoffrequired was not found 
in aggregate oracle.sysman.top.agent:10.2.0.1.1:common:family=CFM:oh=/oragrid/OracleHomes2/agent10g:label=1
        at oracle.sysman.emCfg.core.CfmAggregateHolder.getParameterPair(CfmAggregateHolder.java:265)
        at oracle.sysman.emCfg.core.CfmAggregateHolder.getParameterReference(CfmAggregateHolder.java:876)
        at oracle.sysman.emCfg.core.CfmSession.processAggregateCommands(CfmSession.java:231)
        at oracle.sysman.emCfg.core.CfmSession.command(CfmSession.java:136)
        at oracle.sysman.emCfg.core.CfmSession.cmd(CfmSession.java:106)
        at oracle.sysman.emCfg.client.CfwSession.cmd(CfwSession.java:194)
        at oracle.sysman.emCfg.client.CfwAggregate.getParameterReference(CfwAggregate.java:58)
        at oracle.sysman.emCfg.common.EmCfgActionPerform.updateParameters(EmCfgActionPerform.java:810)
        at oracle.sysman.emCfg.common.EmCfgActionPerform.initialize(EmCfgActionPerform.java:300)
        at oracle.sysman.emCfg.common.EmCfgActionPerform.perform(EmCfgActionPerform.java:307)
        at oracle.sysman.emCfg.common.EmCfgActionPerform.serviceRequest(EmCfgActionPerform.java:734)
        at oracle.sysman.emCfg.common.EmCfgActionPerform.start(EmCfgActionPerform.java:713)
        at oracle.sysman.oii.oiic.OiicRunConfig.main(OiicRunConfig.java:998)

It seems I am the first person in the world having this stack; b_isoneoffrequired cannot be found on the search engines.
In reality it is contained in agentca.pl
 if ( $action eq "REDISCOVER")
   {
      print RSPFILE "${prefix}b_isoneoffrequired=false\n";
   }
   elsif( $action eq "RECONFIGURE")
   {
       print RSPFILE "${prefix}b_isoneoffrequired=true\n";
   }

ha2-> find /oragrid -name response_file
/oragrid/OracleHomes2/agent10g/response_file
ha2-> cat /oragrid/OracleHomes2/agent10g/response_file
oracle.sysman.top.agent|b_startAgent=TRUE
oracle.sysman.top.agent|b_onlyStartAgent=FALSE
oracle.sysman.top.agent|b_upgrade=FALSE
oracle.sysman.top.agent|b_agentUpgrade=FALSE
oracle.sysman.top.agent|b_noUpgrade=TRUE
oracle.sysman.top.agent|b_configure=FALSE
oracle.sysman.top.agent|b_doDiscovery=TRUE
oracle.sysman.top.agent|b_secureAgent=FALSE
oracle.sysman.top.agent|b_isoneoffrequired=false

The temptation is now to modify targets.xml manually following the example on ha1; let's see what happens

ha2-> cat /oragrid/OracleHomes2/agent10g/sysman/emd/targets.xml
<Targets AGENT_TOKEN="96298cdb5b8d2e6573665ae2c456fc6ccc53cb65">
        <Target TYPE="oracle_emd" NAME="ha2:3872"/>
        <Target TYPE="host" NAME="ha2"/>
        <Target TYPE="oracle_database" NAME="SBF1">
                <Property NAME="OracleHome" VALUE="/opt/oracle/product/11g/db_1"/>
                <Property NAME="UserName" VALUE="ad1571087c13ba1a" ENCRYPTED="TRUE"/>
                <Property NAME="MachineName" VALUE="ha2"/>
                <Property NAME="Port" VALUE="1521"/>
                <Property NAME="SID" VALUE="SBF1"/>
                <Property NAME="ServiceName" VALUE="SBF1"/>
        </Target>
        <Target TYPE="oracle_listener" NAME="LISTENER_SBF1_ha2">
                <Property NAME="ListenerOraDir" VALUE="/opt/oracle/product/11g/db_1/network/admin"/>
                <Property NAME="LsnrName" VALUE="LISTENER_SBF1"/>
                <Property NAME="Machine" VALUE="ha2"/>
                <Property NAME="OracleHome" VALUE="/opt/oracle/product/11g/db_1"/>
                <Property NAME="Port" VALUE="1521"/>
        </Target>
</Targets>
By stopping and restarting the agent, the targets on ha2 are now visible



This article seems to teach that manually modifying targets.xml works ... well, in this case it did.

Yet, I will try to figure out why the database and the listener are not discovered by the agent.

Rate this note ...
Useless Poor Average Good Very helpful