Tentativa de instalar o Oracle Grid Infrastructure 11.2.0.4 em Red Hat Enterprise Linux 7.5, falha ao executar o script root.sh:
# /orabin01/app/11.2.0.4/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /orabin01/app/11.2.0.4/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /orabin01/app/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node srvdbprot successfully pinned.
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
2021-08-25 09:37:06.930:
[client(21266)]CRS-2101:The OLR was formatted using version 3.
2021-08-25 09:37:18.319:
[client(21316)]CRS-1001:The OCR was formatted using version 3.
ohasd failed to start at /orabin01/app/11.2.0.4/grid/crs/install/roothas.pl line 377, <ALERTLOG> line 4.
/orabin01/app/11.2.0.4/grid/perl/bin/perl -I/orabin01/app/11.2.0.4/grid/perl/lib -I/orabin01/app/11.2.0.4/grid/crs/install /orabin01/app/11.2.0.4/grid/crs/install/roothas.pl execution failed
Causa
O erro ocorre devido ao bug 18370031 – RC SCRIPTS ON OL7 FOR CLUSTERWARE
Solução
Para resolver esse impasse, é necessário seguir os seguintes passos:
- 1) Cancelar a instalação e desinstalar o Grid Home
- 2) Iniciar uma nova instalação, mas não executar o root.sh
- 3) Aplicar o patch 18310031 no Grid Home
- 4) Executar o script root.sh
- 5) Continuar a instalação
Passo a passo:
1) Cancelar a instalação e desintalar o Grid Home
Vá para GRID_HOME/deinstall com o usuário grid:
$ cd $ORACLE_HOME/deinstall $ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /tmp/deinstall2021-08-25_10-13-06AM/logs/ ############ ORACLE DEINSTALL & DECONFIG TOOL START ############ ######################### CHECK OPERATION START ######################### ## [START] Install check configuration ## Checking for existence of the Oracle home location /orabin01/app/11.2.0.4/grid Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server Oracle Base selected for deinstall is: /orabin01/app/grid Checking for existence of central inventory location /orabin01/app/oraInventory Checking for existence of the Oracle Grid Infrastructure home /orabin01/app/11.2.0.4/grid Checking for sufficient temp space availability on node(s) : 'srvdbprot' ## [END] Install check configuration ## Traces log file: /tmp/deinstall2021-08-25_10-13-06AM/logs//crsdc.log Network Configuration check config START Network de-configuration trace file location: /tmp/deinstall2021-08-25_10-13-06AM/logs/netdc_check2021-08-25_10-13-23-AM.log Network Configuration check config END Asm Check Configuration START ASM de-configuration trace file location: /tmp/deinstall2021-08-25_10-13-06AM/logs/asmcadc_check2021-08-25_10-13-23-AM.log ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: ASM was not detected in the Oracle Home ######################### CHECK OPERATION END ######################### ####################### CHECK OPERATION SUMMARY ####################### Oracle Grid Infrastructure Home is: /orabin01/app/11.2.0.4/grid The cluster node(s) on which the Oracle home deinstallation will be performed are:null Oracle Home selected for deinstall is: /orabin01/app/11.2.0.4/grid Inventory Location where the Oracle home registered is: /orabin01/app/oraInventory ASM was not detected in the Oracle Home Do you want to continue (y - yes, n - no)? [n]: y A log of this session will be written to: '/tmp/deinstall2021-08-25_10-13-06AM/logs/deinstall_deconfig2021-08-25_10-13-11-AM.out' Any error messages from this session will be written to: '/tmp/deinstall2021-08-25_10-13-06AM/logs/deinstall_deconfig2021-08-25_10-13-11-AM.err' ######################## CLEAN OPERATION START ######################## ASM de-configuration trace file location: /tmp/deinstall2021-08-25_10-13-06AM/logs/asmcadc_clean2021-08-25_10-13-34-AM.log ASM Clean Configuration END Network Configuration clean config START Network de-configuration trace file location: /tmp/deinstall2021-08-25_10-13-06AM/logs/netdc_clean2021-08-25_10-13-34-AM.log De-configuring backup files... Backup files de-configured successfully. The network configuration has been cleaned up successfully. Network Configuration clean config END ----------------------------------------> Run the following command as the root user or the administrator on node "srvdbprot". /tmp/deinstall2021-08-25_10-13-06AM/perl/bin/perl -I/tmp/deinstall2021-08-25_10-13-06AM/perl/lib -I/tmp/deinstall2021-08-25_10-13-06AM/crs/install /tmp/deinstall2021-08-25_10-13-06AM/crs/install/roothas.pl -force -deconfig -paramfile "/tmp/deinstall2021-08-25_10-13-06AM/response/deinstall_Ora11g_gridinfrahome1.rsp" Press Enter after you finish running the above commands <----------------------------------------
Execute o script solicitado com o usuário root:
# /tmp/deinstall2021-08-25_10-13-06AM/perl/bin/perl -I/tmp/deinstall2021-08-25_10-13-06AM/perl/lib -I/tmp/deinstall2021-08-25_10-13-06AM/crs/install /tmp/deinstall2021-08-25_10-13-06AM/crs/install/roothas.pl -force -deconfig -paramfile "/tmp/deinstall2021-08-25_10-13-06AM/response/deinstall_Ora11g_gridinfrahome1.rsp" Using configuration parameter file: /tmp/deinstall2021-08-25_10-13-06AM/response/deinstall_Ora11g_gridinfrahome1.rsp CRS-4639: Could not contact Oracle High Availability Services CRS-4000: Command Stop failed, or completed with errors. CRS-4639: Could not contact Oracle High Availability Services CRS-4000: Command Delete failed, or completed with errors. CRS-4544: Unable to connect to OHAS CRS-4000: Command Stop failed, or completed with errors. Successfully deconfigured Oracle Restart stack
Volte a sessão do grid e pressione ENTER:
Press Enter after you finish running the above commands <---------------------------------------- Setting the force flag to false Setting the force flag to cleanup the Oracle Base Oracle Universal Installer clean START Detach Oracle home '/orabin01/app/11.2.0.4/grid' from the central inventory on the local node : Done Failed to delete the directory '/orabin01/app/11.2.0.4/grid'. The directory is in use. Delete directory '/orabin01/app/11.2.0.4/grid' on the local node : Failed <<<< Delete directory '/orabin01/app/oraInventory' on the local node : Done Failed to delete the directory '/orabin01/app/grid'. The directory is in use. Delete directory '/orabin01/app/grid' on the local node : Failed <<<< Oracle Universal Installer cleanup completed with errors. Oracle Universal Installer clean END ## [START] Oracle install clean ## Clean install operation removing temporary directory '/tmp/deinstall2021-08-25_10-13-06AM' on node 'srvdbprot' ## [END] Oracle install clean ## ######################### CLEAN OPERATION END ######################### ####################### CLEAN OPERATION SUMMARY ####################### Oracle Restart was already stopped and de-configured on node "srvdbprot" Oracle Restart is stopped and de-configured successfully. Successfully detached Oracle home '/orabin01/app/11.2.0.4/grid' from the central inventory on the local node. Failed to delete directory '/orabin01/app/11.2.0.4/grid' on the local node. Successfully deleted directory '/orabin01/app/oraInventory' on the local node. Failed to delete directory '/orabin01/app/grid' on the local node. Oracle Universal Installer cleanup completed with errors. Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'srvdbprot' at the end of the session. Run 'rm -rf /opt/ORCLfmap' as root on node(s) 'srvdbprot' at the end of the session. Run 'rm -rf /etc/oratab' as root on node(s) 'srvdbprot' at the end of the session. Oracle deinstall tool successfully cleaned up temporary directories. ####################################################################### ############# ORACLE DEINSTALL & DECONFIG TOOL END #############
Na sessão com root, execute os comandos acima para remover os diretórios:
rm -rf /etc/oraInst.loc rm -rf /opt/ORCLfmap rm -rf /etc/oratab
2) Inicie um nova instalação do Grid Infrastructure e não execute os scripts com root.
Como a instalação falhou antes de configurar o ASM, o status do ASM Disk ainda estará como CANDIDATE.

3) Em outra sessão com usuário grid, aplique o patch 18370031.
Atualizando a versão do OPatch para a última disponível na nota 6880880:
$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch.bkp $ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME Archive: p6880880_112000_Linux-x86-64.zip creating: /orabin01/app/11.2.0.4/grid/OPatch/ inflating: /orabin01/app/11.2.0.4/grid/OPatch/README.txt inflating: /orabin01/app/11.2.0.4/grid/OPatch/emdpatch.pl inflating: /orabin01/app/11.2.0.4/grid/OPatch/operr_readme.txt creating: /orabin01/app/11.2.0.4/grid/OPatch/scripts/ ....
Aplicando o patch no Grid Home:
$ unzip p18370031_112040_Linux-x86-64.zip Archive: p18370031_112040_Linux-x86-64.zip creating: 18370031/ creating: 18370031/custom/ creating: 18370031/custom/scripts/ inflating: 18370031/custom/scripts/postpatch.sh inflating: 18370031/custom/scripts/prepatch.sh creating: 18370031/custom/server/ creating: 18370031/custom/server/18370031/ ....
$ cd 18370031 $ export PATH=$ORACLE_HOME/OPatch:$PATH $ opatch apply Oracle Interim Patch Installer version 11.2.0.3.31 Copyright (c) 2021, Oracle Corporation. All rights reserved. Oracle Home : /orabin01/app/11.2.0.4/grid Central Inventory : /orabin01/app/oraInventory from : /orabin01/app/11.2.0.4/grid/oraInst.loc OPatch version : 11.2.0.3.31 OUI version : 11.2.0.4.0 Log file location : /orabin01/app/11.2.0.4/grid/cfgtoollogs/opatch/opatch2021-08-25_10-28-58AM_1.log Verifying environment and performing prerequisite checks... -------------------------------------------------------------------------------- Start OOP by Prereq process. Launch OOP... Oracle Interim Patch Installer version 11.2.0.3.31 Copyright (c) 2021, Oracle Corporation. All rights reserved. Oracle Home : /orabin01/app/11.2.0.4/grid Central Inventory : /orabin01/app/oraInventory from : /orabin01/app/11.2.0.4/grid/oraInst.loc OPatch version : 11.2.0.3.31 OUI version : 11.2.0.4.0 Log file location : /orabin01/app/11.2.0.4/grid/cfgtoollogs/opatch/opatch2021-08-25_10-29-13AM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 18370031 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/orabin01/app/11.2.0.4/grid') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '18370031' to OH '/orabin01/app/11.2.0.4/grid' Patching component oracle.crs, 11.2.0.4.0... Patch 18370031 successfully applied. Log file location: /orabin01/app/11.2.0.4/grid/cfgtoollogs/opatch/opatch2021-08-25_10-29-13AM_1.log OPatch succeeded.
4) Continue a instalação do Grid Infrastructure, executando os scripts solicitados com o usuário root:
# /orabin01/app/oraInventory/orainstRoot.sh Changing permissions of /orabin01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /orabin01/app/oraInventory to oinstall. The execution of the script is complete.
# /orabin01/app/11.2.0.4/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /orabin01/app/11.2.0.4/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /orabin01/app/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node srvdbprot successfully pinned.
Adding Clusterware entries to oracle-ohasd.service
srvdbprot 2021/08/25 10:30:45 /orabin01/app/11.2.0.4/grid/cdata/srvdbprot/backup_20210825_103045.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
5) Na tela de instalação, clique em OK para continuar a configuração do Grid Infrastructure.

Muito bom Maicon! Excelente explicação e abordagem do assunto!
Obrigado, Mestre Raul!
Abraço!
Simples e direto! Me salvou aqui. Muito obrigado!
Que bom que ajudou !
Obrigado pelo feedback, abraço.
Ao instalar o rdbms apenas, também apresentou um outro erro, com relação ao MK_EMAGENT_NMECTL.
Aconteceu com você também?
Não pesquisei se aqui no site tem a solução, mas encontrei o “workaround” aqui: https://oraclefreak.wordpress.com/oracle-database-11-2-0-4-on-ohel-7-rhel-7/