In one of my lab environments where an Oracle 19c database is up and running, it was time to upgrade it to 21c by AutoUpgrade. The new ORACLE_HOME was ready, the software extracted. But when running the OUI installer in silent mode, it stops working: [FATAL] [INS-32035].
runInstaller – 1st run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ cd /u01/app/oracle/product/21.0.0/dbhome_1 $ ./runInstaller -ignorePrereq -waitforcompletion -silent \ -responseFile /u01/app/oracle/product/21.0.0/dbhome_1/install/response/db_install.rsp \ oracle.install.option=INSTALL_DB_SWONLY \ ORACLE_HOSTNAME=heckenweg.kestenholz.net \ UNIX_GROUP_NAME=oinstall \ INVENTORY_LOCATION=/u01/app/oraInventory \ SELECTED_LANGUAGES=en,en_GB \ ORACLE_HOME=/u01/app/oracle/product/21.0.0/dbhome_1 \ ORACLE_BASE=/u01/app/oracle \ oracle.install.db.InstallEdition=EE \ oracle.install.db.OSDBA_GROUP=dba \ oracle.install.db.OSBACKUPDBA_GROUP=dba \ oracle.install.db.OSDGDBA_GROUP=dba \ oracle.install.db.OSKMDBA_GROUP=dba \ oracle.install.db.OSRACDBA_GROUP=dba \ SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \ DECLINE_SECURITY_UPDATES=true |
The error from the OUI logfile:
1 2 |
SEVERE: [Aug 24, 2021 5:11:55 PM] [FATAL] [INS-32035] The location (/u01/app/oraInventory) specified for the central inventory is not empty. CAUSE: The specified central inventory location is either locked by different install session, or the location specified does not have write permissions for the logs. |
Quick Solution
An opatch lsinventory command from the existing 19c installation shows, that there is a file called oraInst.loc is located in the 19c ORACLE_HOME. But for existing RDBMS installations, the OUI has to verify the inventory location in /etc/oraInst.loc or depending on the OS in /var/opt/oracle/oraInst.loc. But: NO FILE THERE.
The quick and simple solution was as OS user root to copy the existing file which points to the inventory directory to /etc and re-start the OUI.
1 2 |
# cp /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc /etc # chmod 644 /etc/oraInst.loc |
runInstaller – 2nd run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
./runInstaller -ignorePrereq -waitforcompletion -silent \ -responseFile /u01/app/oracle/product/21.0.0/dbhome_1/install/response/db_install.rsp \ oracle.install.option=INSTALL_DB_SWONLY \ ORACLE_HOSTNAME=heckenweg.kestenholz.net \ ... ... You can find the log of this install session at: /u01/app/oraInventory/logs/InstallActions2021-08-25_07-34-17AM/installActions2021-08-25_07-34-17AM.log As a root user, execute the following script(s): 1. /u01/app/oracle/product/21.0.0/dbhome_1/root.sh Execute /u01/app/oracle/product/21.0.0/dbhome_1/root.sh on the following nodes: [heckenweg] Successfully Setup Software. |
Why this happened?
During the old 19c installation, I did not run /u01/app/oraInventory/orainstRoot.sh which creates this file. Extract from the 19c runInstaller log:
1 2 3 |
installActions2021-05-31_10-05-29PM.out:As a root user, execute the following script(s): installActions2021-05-31_10-05-29PM.out:Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: installActions2021-05-31_10-05-29PM.out:Execute /u01/app/oracle/product/19.0.0/dbhome_1/root.sh on the following nodes: |
Alternative solution
Just run /u01/app/oraInventory/orainstRoot.sh again – it creates the file /etc/oraInst.loc for you and sets the correct permissions. Take a look here in this My Oracle Support note for a detailed description what the script does:
- What Are Root.sh And OrainstRoot.sh Scripts In A Standalone RDBMS Installation? (Doc ID 1493121.1)
Summary
This was really a stupid error. Lesson learned: read the f* terminal output – even in lab environments. AutoUpgrade can start now 🙂