The home is not clean and cannot be used due to a failed OPatch execution

A while ago I ran into this error when trying to install Oracle 19c on an Oracle Linux 8 sever and apply the patch set 32545013 on top.

The error was from the following command:

runInstaller -silent -applyRU /tmp/32545013 -force -executePrereqs -responseFile /tmp/db_patch.rsp

ERROR: The home is not clean. This home cannot be used since there was a failed OPatch execution in this home. Use a different home to proceed.

The command is a new feature introduced from Oracle 18c — combine two tasks into one: install a new Oracle base version and apply patches.

Starting from 18c, the Oracle database installation is an image-based installation. It simplifies installation and configuration of Oracle database software. What you need to do is to prepare the server, create the new Oracle home, extract the image file into the newly-created Oracle home, and run the setup wizard (runInstaller and for Database installation or Grid Infrastructure respectively) to register the Oracle Database product.

Back to the error I encountered, that happened when OPatchauto was called by runInstaller to apply patches. Usually the log file location for OPatchauto is under the following directory or a subdirectory within this location:


Searching around the logs, I saw the error from /opt/oracle_19c/cfgtoollogs/opatchauto/core/opatch/opatch2021-07-21_13-39-21PM_1.log:

[Jul 21, 2021 1:42:11 PM] [INFO]    Failed to copy /opt/oracle_19c/apex/images/libraries/codemirror/5.16/mode/ruby/index.html to destination /opt/oracle_19c/.patch_storage/NApply/2021-07-21_13-41-47PM/backup/apex/images/libraries/codemirror/5.16/mode/ruby/index.html
                                     Reason=java.nio.file.FileSystemException: /opt/oracle_19c/apex/images/libraries/codemirror/5.16/mode/ruby/index.html: Operation not permitted

The file index.html had zero byte as the size!

It looked like a permission issue and I knew the new Oracle Linux 8, I had fapolicyd (File Access Policy Daemon) enabled with the policies pre-defined.

Because I didn’t know what policy was causing this, so I stopped and disabled the fapolicyd. Then removed the whole Oracle software and started again like a fresh installation. It worked this time.

A few more notes:

1. Regarding OPatch and OPatchauto:

OPatch: A Java-based utility that enables the application and rollback of patches to Oracle software.

OPatchauto: A patch orchestration tool that generates patching instructions specific to your target configuration and then uses OPatch to perform the patching operations without user intervention. Specifically, OPatchAuto can:

  • Perform pre-patch checks.
  • Apply the patch.
  • Start and stop the running servers.
  • Perform post-patch checks.
  • Roll back patches when patch deinstallation is required.

2. For an one-off patch, use the option “-applyOneOffs” of runInstaller to apply the patch

Leave a Reply

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

You are commenting using your 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