Infrastructure at your Service

Mouhamadou Diaw

Grid Infrastructure 11.2.0.3 PSU: My Opatch version check is failing

Last day I was configuring grid infrastructure 11.2.0.3 for a standlone server.
After the installation, I decided to apply the Patch Set Update 11.2.0.3.7 (Includes Database PSU 11.2.0.3.7) – 16742216
In the documentation it is marked You must use the OPatch utility version 11.2.0.3.4 or later to apply this patch.
Verifying my opatch version, I see that I have to update it

[root@ ]# ./OPatch/opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7

So I download a newer version and install it

[grid psuJul2013]$ /u00/app/11.2.0/grid/OPatch/opatch version
OPatch Version: 11.2.0.3.15
OPatch succeeded.
[grid@dbserver psuJul2013]$

With my new opatch I am fine to proceed. First I create my ocm.rsp file

[oracle@dbserver ~]$ /u00/app/oracle/product/11.2.0/pcsdb/OPatch/ocm/bin/emocmrsp
OCM Installation Response Generator 10.3.7.0.0 - Production
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
..
Provide your email address to be informed of security issues, install and initiate Oracle Configuration Manager. Easier for you if you use your My Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
..
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
The OCM configuration response file (ocm.rsp) was successfully created.
[oracle@dbserver ~]$

Then I unzip the patch
[oracle@dbserver 11203]$ unzip -d psuJul2013/ p16742216_112030_Linux-x86-64.zip
And I run the command to apply the patch

[root@ 11203]# /u00/app/11.2.0/grid/OPatch/opatch auto /u00/software/11203/psuJul2013 -ocmrf /u00/software/11203/ocm.rsp
Executing /u00/app/11.2.0/grid/perl/bin/perl /u00/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u00/software/11203 -patchn psuJul2013 -ocmrf /u00/software/11203/ocm.rsp -paramfile /u00/app/11.2.0/grid/crs/install/crsconfig_params
..
This is the main log file: /u00/app/11.2.0/grid/cfgtoollogs/opatchauto2017-07-06_11-39-25.log
..
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u00/app/11.2.0/grid/cfgtoollogs/opatchauto2017-07-06_11-39-25.report.log
..
2017-07-06 11:39:25: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u00/app/11.2.0/grid/crs/install/crsconfig_params
The opatch minimum version check for patch /u00/software/11203/psuJul2013/16619898 failed for /u00/app/11.2.0/grid
The opatch minimum version check for patch /u00/software/11203/psuJul2013/16619892 failed for /u00/app/11.2.0/grid
Opatch version check failed for oracle home /u00/app/11.2.0/grid
Opatch version check failed
ERROR: update the opatch version for the failed homes and retry

..
opatch auto failed.

Strange, though my opatch version seems to be fine, I got errors about opatch version check.
Looking into the log file /u00/app/11.2.0/grid/cfgtoollogs/opatchauto2017-07-06_11-39-25.log, I find following lines. It seems that there is a write permission issue.
[oracle@ pcsdb]$ less /u00/app/11.2.0/grid/cfgtoollogs/opatchauto2017-07-06_11-39-25.log
...
...
OPatch failed to lock and get an Inventory Session for the given Oracle Home /u00/app/11.2.0/grid
Possible causes are:
No read or write permission to $ORACLE_HOME, cannot create $ORACLE_HOME/.patch_storage
No read or write permission to $ORACLE_HOME/.patch_storage
OPatch cannot proceed further because system will not be able to backup files, or read the backup area for rollback/restore.
OPatchSession cannot load inventory for the given Oracle Home /u00/app/11.2.0/grid. Possible causes are:
No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory
..
UtilSession failed: IPMRWServices::verifyPatchStorageDirectory() cannot read or write to /u00/app/11.2.0/grid/.patch_storage
..
OPatch failed with error code 73
..
2017-07-06 11:39:30: Status of opatch version check for /u00/app/11.2.0/grid is 0
2017-07-06 11:39:30: Opatch version check failed for oracle home /u00/app/11.2.0/grid
2017-07-06 11:39:30: Opatch version check failed
2017-07-06 11:39:30: ERROR: update the opatch version for the failed homes and retry

After some researches it seems that it’s a Bug 24584367. A workaround is to create the directory $GRID_HOME/.path_storage and to grant appropriate privileges to user grid on it.

[root@dbserver 11203]# cd /u00/app/11.2.0/grid/
[root@dbserver grid]# mkdir .patch_storage
[root@dbserver grid]# chown grid:oinstall .patch_storage/

And then rerun the opatch process which finally goes fine.

[root@dbserver psuJul2013]# /u00/app/11.2.0/grid/OPatch/opatch auto /u00/software/11203/psuJul2013 -ocmrf /u00/software/11203/ocm.rsp
Executing /u00/app/11.2.0/grid/perl/bin/perl /u00/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u00/software/11203 -patchn psuJul2013 -ocmrf /u00/software/11203/ocm.rsp -paramfile /u00/app/11.2.0/grid/crs/install/crsconfig_params
..
This is the main log file: /u00/app/11.2.0/grid/cfgtoollogs/opatchauto2017-07-06_11-44-05.log
..
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u00/app/11.2.0/grid/cfgtoollogs/opatchauto2017-07-06_11-44-05.report.log
..
2017-07-06 11:44:05: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u00/app/11.2.0/grid/crs/install/crsconfig_params
..
Stopping CRS...
Stopped CRS successfully
..
patch /u00/software/11203/psuJul2013/16619898 apply successful for home /u00/app/11.2.0/grid
patch /u00/software/11203/psuJul2013/16619892 apply successful for home /u00/app/11.2.0/grid
..
Starting CRS...
CRS-4123: Oracle High Availability Services has been started.
..
opatch auto succeeded.

Hope that this article will help to save time.

 

Leave a Reply

Mouhamadou Diaw
Mouhamadou Diaw

Consultant