Unknown host name in config while patching RAC database

Issue:- 
While analyzing  2015 patches on RAC you may come to face below error.

 [root@server1 db]# <ORACLE_HOME>/OPatch/opatchauto apply /oradump/software/12c/PSU/19777496/ -analyze -oh <ORACLE_HOME>

 OPatch Automation Tool
 Copyright (c)2014, Oracle Corporation. All rights reserved.

 OPatchauto Version : 12.1.0.1.6
 OUI Version        : 12.1.0.2.0
 Running from       : <ORACLE_HOME>

 opatchauto log file: /rdbms/app/12.1.0.2/grid/cfgtoollogs/opatchauto/19777496/opatch_gi_2017-11-30_18-26-52_analyze.log

 NOTE: opatchauto is running in ANALYZE mode. There will be no change to your system.

 Parameter Validation: Successful

 System Configuration Collection failed: oracle.osysmodel.driver.sdk.productdriver.ProductDriverException: Unknown host name in config:server1

 opatchauto failed with error code 1.


Solution :- 

The solution which I found is seems to be awkward but it worked for me 

Hostname in inventory.xml for DB_HOME was in capital letter , I changed to small letter & it worked.

Also, 
hostname with domain name is resisted to node list of DB home in inventory.xml, but it is different from GI home.
hostname in node list of DB home should be same as GI home's in inventory.xml.

Step 1 : How to find inventory.xml

[ora12c@server1 :]$ find /rdbms -name inventory.xml                 //Change directory as per your environment

/rdbms/app/oracle.OLD/oraInventory/ContentsXML/inventory.xml
/rdbms/app/oracle/oraInventory/backup/2017-11-07_11-57-34-PM/ContentsXML/inventory.xml
/rdbms/app/oracle/oraInventory/backup/2017-11-08_12-14-03AM/ContentsXML/inventory.xml
/rdbms/app/oracle/oraInventory/backup/2017-11-08_12-13-11-AM/ContentsXML/inventory.xml
/rdbms/app/oracle/oraInventory/ContentsXML/inventory.xml


[ora12c@server1 grid]$ more /rdbms/app/oracle/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2014, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>12.1.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI12Home1" LOC="/rdbms/app/12.1.0.2/grid" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="SERVER1"/>
      <NODE NAME="SERVER2"/>
   </NODE_LIST>
</HOME>
<HOME NAME="OraDB12Home1" LOC="/rdbms/app/oracle/12.1.0.2/db" TYPE="O" IDX="2">
   <NODE_LIST>
      <NODE NAME="SERVER1"/>
      <NODE NAME="SERVER2"/>
   </NODE_LIST>
</HOME>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>


Step 2 : How to change server name in inventory.xml 

Run below command using root (I am changing for DB_HOME not for grid as I was facing issue for DB_Home)

<ORACLE_HOME>/oui/bin/runInstaller -updateNodeList ORACLE_HOME="<ORACLE_HOME>" "CLUSTER_NODES={server1,server2}" -silent -local


Step 3 : Check inventory.xml again[ora12c@server1 grid]$ more /rdbms/app/oracle/oraInventory/ContentsXML/inventory.xml<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2014, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>12.1.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI12Home1" LOC="/rdbms/app/12.1.0.2/grid" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="SERVER1"/>
      <NODE NAME="SERVER2"/>
   </NODE_LIST>
</HOME>
<HOME NAME="OraDB12Home1" LOC="/rdbms/app/oracle/12.1.0.2/db" TYPE="O" IDX="2">
   <NODE_LIST>
      <NODE NAME="server1"/>
      <NODE NAME="server2"/>
   </NODE_LIST>
</HOME>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>



Step 4: Run analyze again :-

[root@server1 db]# <ORACLE_HOME>/OPatch/opatchauto apply /oradump/software/12c/PSU/19777496/ -analyze -oh <ORACLE_HOME>

OPatch Automation Tool
Copyright (c)2014, Oracle Corporation. All rights reserved.
OPatchauto Version : 12.1.0.1.6
OUI Version        : 12.1.0.2.0
Running from       : <ORACLE_HOME>


opatchauto log file: /rdbms/app/12.1.0.2/grid/cfgtoollogs/opatchauto/19777496/opatch_gi_2017-11-30_19-08-42_analyze.log
NOTE: opatchauto is running in ANALYZE mode. There will be no change to your system.
Parameter Validation: Successful
Configuration Validation: Successful

Patch Location: /oradump/software/12c/PSU/19777496
Grid Infrastructure Patch(es): 19777496
DB Patch(es): 19777496
Patch Validation: Successful

User specified the following DB home(s) for this session:
<ORACLE_HOME>
Analyzing patch(es) on "<ORACLE_HOME>" ...
Patch "/oradump/software/12c/PSU/19777496/19777496" successfully analyzed on "<ORACLE_HOME>" for apply.
SQL changes, if any, are analyzed successfully on the following database(s): DB_NAME

Apply Summary:
Following patch(es) are successfully analyzed:
DB Home: <ORACLE_HOME>: 19777496
opatchauto succeeded.


Thats It :)


No comments:

Post a Comment