Applying OJVM July 2021 patch(32876380) on GI HOME fails with “ArchiveAction: Destination File “$GI_HOME/lib/lib*****.a” does not exists or is not writeable” & “ApplySession::apply failed: mv: 0653-401 Cannot rename $GI_HOME/lib/lib*****.so”

Dear Readers,

In this post, I am going to write about the issue I faced while patching GI HOME with July 2021 OJVM patch(32876380) post applying July 2021 GI RU patch(32904851).

I had a requirement to apply patch 32900083 (GI RU & OJVM Combo July 2021) on GI HOME, which includes following 2 patches:

  • 32904851 ==> Database Release Update : 19.12.0.0.210720
  • 32876380 ==> OJVM RELEASE UPDATE: 19.12.0.0.210720

Application of patch 32904851 was done using opatchauto utility & completed successfully without any issues. Post this when I tried applying patch 32876380 on same GI HOME received below error:

Error was as given below:

ArchiveAction: Destination File “/u01/app/19.6.0.0/grid/lib/libserver19.a” does not exists or is not writeable
‘oracle.rdbms, 19.0.0.0.0’: Cannot update file ‘/u01/app/19.6.0.0/grid/libserver19.a’ with ‘/joxwtp.o’

So from error it looks like Oracle user lacks write permission on given library file, which is causing issue.

So first solution I had in my mind to change permissions on given library file, but thought of checking supporting MOS notes for the confirmation.

opatch apply fails with Copy Action: Destination File “$ORACLE_HOME/..” does not exists or is not writeable. (Doc ID 1498065.1)

Above note had similar action plan, so I went ahead with changing permissions on specific library file.

host1:/u01/patch/32900083/32876380 $ ls -lrt /u01/app/19.6.0.0/grid/lib/libserver19.a
-rw-r–r– 1 root oinstall 457374018 20 Aug 15:54 /u01/app/19.6.0.0/grid/lib/libserver19.a

host1:/u01/patch/32900083/32876380 $ chown oracle:oinstall /u01/app/19.6.0.0/grid/lib/libserver19.a

host1:/u01/patch/32900083/32876380 $ ls -lrt /u01/app/19.6.0.0/grid/lib/libserver19.a
-rw-r–r– 1 oracle oinstall 457374018 20 Aug 15:54 /u01/app/19.6.0.0/grid/lib/libserver19.a

After this I attempted re-application of patch. This time it went a steps ahead than prior attempt, now it failed with different error:

UtilSession failed: ApplySession failed in system modification phase… ‘ApplySession::apply failed: mv: 0653-401 Cannot rename /u01/app/19.6.0.0/grid/lib/libasmclntsh1 9.so to /u01/app/19.6.0.0/grid/lib/libasmclntsh19.so.bak:
The file access permissions do not allow the specified action.
make: 1254-004 The error code from the last command is 1.

This confirms, the issue is not with specific library but multiple ones. Mostly using root ownership for running opatchauto caused this. We need to fix all permissions on GI_HOME binaries.

To fix permissions on GI_HOME binaries, its always recommended to use roothas.sh.

I followed below action plan for the same:

$GI_HOME/crs/install/roothas.sh -prepatch
$GI_HOME/crs/install//roothas.sh -init
$GI_HOME/crs/install/roothas.sh -postpatch

After following this action plan, I was able to apply the patch successfully.

Hope u will find this post very useful.

Cheers

Regards,
Adityanath

1 reply

  1. I抦 impressed, I need to say. Actually not often do I encounter a weblog that抯 both educative and entertaining, and let me inform you, you could have hit the nail on the head. Your thought is excellent; the issue is something that not enough persons are talking intelligently about. I am very glad that I stumbled across this in my search for something regarding this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s