运行rootcrs.pl -deconfig -force -verbose报错(Can't locate Env.pm)
1、一套11gR2 RAC测试环境,折腾崩溃了,打算deconfig重构集群,于是运行了如下命令:
[root@11grac1 11grac1]# /u01/app/11.2.0.4/grid/crs/install/rootcrs.pl -deconfig -force -verbose
Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /u01/app/11.2.0.4/grid/crs/install) at /u01/app/11.2.0.4/grid/crs/install/crsconfig_lib.pm line 715.
BEGIN failed--compilation aborted at /u01/app/11.2.0.4/grid/crs/install/crsconfig_lib.pm line 715.
Compilation failed in require at /u01/app/11.2.0.4/grid/crs/install/rootcrs.pl line 306.
BEGIN failed--compilation aborted at /u01/app/11.2.0.4/grid/crs/install/rootcrs.pl line 306.
[root@11grac1 11grac1]#
该命令提示Can't locate Env.pm错误。看样子像是perl开发环境存在问题。
2、该故障在《rootcrs.pl/roothas.pl Fails With Can't locate Env.pm (Doc ID 2019784.1)》一文中有详细说明。 原因是OL7系统自带的perl有问题。该问题在12.1.0.2中解决,当前有个workaround可以解决,那就是使用GI自带的perl,而不使用操作系统自带的perl。
3、
[root@11grac1 ~]# /u01/app/11.2.0.4/grid/perl/bin/perl /u01/app/11.2.0.4/grid/crs/install/rootcrs.pl -deconfig -force -verbose
Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
PRCR-1119 : Failed to look up CRS resources of ora.cluster_vip_net1.type type
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.gsd is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.ons is registered
Cannot communicate with crsd
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '11grac1'
CRS-2673: Attempting to stop 'ora.crf' on '11grac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on '11grac1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on '11grac1'
CRS-2677: Stop of 'ora.cssdmonitor' on '11grac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on '11grac1' succeeded
CRS-2677: Stop of 'ora.crf' on '11grac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on '11grac1'
CRS-2677: Stop of 'ora.gipcd' on '11grac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on '11grac1'
CRS-2677: Stop of 'ora.gpnpd' on '11grac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '11grac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
[root@11grac1 ~]#