问题描述:
在Grid环境中,如果修改了主机名,启动Grid时会出现如下错误:
[grid@sztest ~]$ sqlplus / as sysasm
SQL*Plus: Release 12.1.0.2.0 Production on Wed Apr 15 20:42:27 2020
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
检查css服务:
[grid@sztest ~]$ crsctl check css
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.
启动has服务:
[grid@sztest ~]$ crsctl start has
CLSU-00105: operating system interface has reported an internal failure
CLSU-00103: error location: scrcreate5
CLSU-00104: additional error information: need ha priv
CRS-4000: Command Start failed, or completed with errors.
解决方案:
1)移除旧主机名相关的配置信息
[root@sztest ~]# cd /u01/app/grid/product/12.1.0/grid/crs/install/
[root@sztest install]# perl roothas.sh -deconfig -force
Using configuration parameter file: /u01/app/grid/product/12.1.0/grid/crs/install/crsconfig_params
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.
CLSU-00100: operating system function: opendir failed with error data: 2
CLSU-00101: operating system error message: No such file or directory
CLSU-00103: error location: scrsearch1
CLSU-00104: additional error information: cant open scr home dir scls_scr_getval
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
2020/04/15 20:46:44 CLSRSC-337: Successfully deconfigured Oracle Restart stack
2)运行root脚本重新配置css服务
[root@sztest install]# cd /u01/app/grid/product/12.1.0/grid/
[root@sztest grid]# ./root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/grid/product/12.1.0/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.
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: /u01/app/grid/product/12.1.0/grid/crs/install/crsconfig_params
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 sztest successfully pinned.
2020/04/15 20:48:49 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.conf‘
sztest 2020/04/15 20:49:20 /u01/app/grid/product/12.1.0/grid/cdata/sztest/backup_20200415_204920.olr 0
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘sztest‘
CRS-2673: Attempting to stop ‘ora.evmd‘ on ‘sztest‘
CRS-2677: Stop of ‘ora.evmd‘ on ‘sztest‘ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘sztest‘ has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2020/04/15 20:49:37 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
3)配置asm、database、listener等组件信息
[grid@sztest ~]$ srvctl add asm
[grid@sztest ~]$ srvctl start asm
[oracle@sztest ~]$ srvctl add database -db orcl -oraclehome /u01/app/oracle/product/12.1.0/dbhome_1 -diskgroup "DATA,FRA"
从12.1.0.2开始,roothas.sh脚本替代了roothas.pl脚本。
【12c】CRS-4639: Could not contact Oracle High Availability Services