Monday, February 14, 2022

opatchauto and Error in GetCurrentDir(): 13

Recently, cloning GI oracle home, I encountered into the strange error :

---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/19/grid_1914, host: aaa
Command failed:  /u01/app/19.13.0/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/19.13.0/grid CRS="false" -local
Command failure output:                                                                     
Error in GetCurrentDir(): 13
Error in GetCurrentDir(): 13
Error in GetCurrentDir(): 13                    
Starting Oracle Universal Installer...
                                                                                              
Checking swap space: 0 MB available, 500 MB required.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

The log of opatchauto session said that the installer couldn't create the temporary file for checking prerequisites before running opatch :

2022-02-14 19:49:06,805 INFO  [107] com.oracle.glcm.patch.auto.db.integration.controller.action.DBCommonPatchAction - shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: /command_output_20159: cannot create

Looked strange, isn't it ? The installer tried to create the file in the root (/) directory.

The solution was unexpectable : changing current working directory to $ORACLE_HOME.

Good Luck !

 


CRS-6706: Oracle Clusterware Release patch level ('kkk') does not match Software patch level ('lll'). Oracle Clusterware cannot be started.

Today I've encountered such error during the patching all testing environment to the last 2022 Jan Release Update. Particularly, it happened after I applied OJVM patch to GI home (although Mike Dietrich personally didn't advise it,  I often make experiments with non-standard steps on test environment :) ).

My fault steps was the following :

- running rootcrs.sh -unlock 
- applying OJVM patch to GI home
- running rootcrs.sh -lock

But when one-off patch is needed to install to Grid OH, other sequence of steps should be performed :

- running rootcrs.sh -prepatch
- applying one-off patch (OJVM in my case) to GI home
- running rootcrs.sh -postpatch

So, the conclusions : to relink the GI home binaries and perform other necessary file activities, use unlock/lock steps, to install one-off patch use prepatch/postpatch steps.

And finally, the steps I used to resolve the error :
# clscfg -localpatch
# rootcrs.sh -lock
# crsctl start crs

Good Luck and keep your OH in safe ! :)