您的位置:首页 > 数据库 > Oracle

修改主机名导致 CRS-4639: Could not contact Oracle High Availability Services

2013-09-15 19:48 344 查看
11.2.0.3  asm 单实例  修改主机名导致CRS-4639: Could not contact Oracle High Availability Services。修改之前的主机名是11gasm修改成为11gasm1之后查看crs资源情况如下:

[15:42:12][grid@11gasm1 ~]$ crs_stat -t -v

[15:42:14]CRS-0184: Cannot communicate with the CRS daemon.

视图手动的开启crs资源报错如下:

[15:54:55][root@11gasm1 bin]# ./crsctl start resource -all

[15:54:57]CRS-4639: Could not contact Oracle High Availability Services

[15:54:57]CRS-4000: Command Start failed, or completed with errors.

在查看has资源如下:

[15:43:16][grid@11gasm1 ~]$ crsctl check has

[15:43:18]CRS-4639: Could not contact Oracle High Availability Services

也是没有的。

 

解决办法如下:

1.以root用户执行roothas.pl 重新配置has:

[16:12:35][root@11gasm1 install]# ./roothas.pl -verbose -deconfig -force

[16:12:35]Using configuration parameter file: ./crsconfig_params

[16:12:51]CRS-4639: Could not contact Oracle High Availability Services

[16:12:51]CRS-4000: Command Stop failed, or completed with errors.

[16:12:53]CRS-4639: Could not contact Oracle High Availability Services

[16:12:53]CRS-4000: Command Delete failed, or completed with errors.

[16:12:55]CLSU-00100: Operating System function: opendir failed with error data: 2

[16:12:55]CLSU-00101: Operating System error message: No such file or directory

[16:12:55]CLSU-00103: error location: scrsearch1

[16:12:55]CLSU-00104: additional error information: cant open scr home dir scls_scr_getval

[16:12:55]CRS-4544: Unable to connect to OHAS

[16:12:55]CRS-4000: Command Stop failed, or completed with errors.

[16:13:08]Successfully deconfigured Oracle Restart stack

2.使用roothas.pl重新注册主机名等相关信息到ocr和inittab:

16:14:00][root@11gasm1 install]# ./roothas.pl -verbose

[16:14:00]Using configuration parameter file: ./crsconfig_params

[16:14:03]LOCAL ADD MODE

[16:14:03]Creating OCR keys for user 'grid', privgrp 'oinstall'..

[16:14:03]Operation successful.

[16:14:04]LOCAL ONLY MODE

[16:14:04]Successfully accumulated necessary OCR keys.

[16:14:04]Creating OCR keys for user 'root', privgrp 'root'..

[16:14:04]Operation successful.
[16:14:07]CRS-4664: Node 11gasm1 successfully pinned.--11gasm1已经注册成功了

[16:14:07]Adding Clusterware entries to upstart

[16:14:43]

[16:14:43]11gasm1     2013/09/15 16:14:41     /u01/app/11.2.0/grid/cdata/11gasm1/backup_20130915_161441.olr

[16:14:43]Successfully configured Oracle Grid Infrastructure for a Standalone Server

3.添加监听:

[16:21:59][grid@11gasm1 ~]$ srvctl add listener -l LISTENER -p "TCP:1521" -o /u01/app/11.2.0/grid

[16:25:34][grid@11gasm1 ~]$ srvctl status listener
[16:25:35]Listener LISTENER is enabled

[16:25:35]Listener LISTENER is running on node(s): 11gasm1

 

[16:26:17][grid@11gasm1 ~]$ crs_stat -t -v

[16:26:17]Name           Type           R/RA   F/FT   Target    State     Host       

[16:26:17]----------------------------------------------------------------------

[16:26:17]ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    11gasm1    

[16:26:17]ora.cssd       ora.cssd.type  0/5    0/5    ONLINE    ONLINE    11gasm1    

[16:26:17]ora.diskmon    ora....on.type 0/10   0/5    OFFLINE   OFFLINE              

[16:26:17]ora.evmd       ora.evm.type   0/10   0/5    ONLINE    ONLINE    11gasm1    

[16:26:17]ora.ons        ora.ons.type   0/3    0/     OFFLINE   OFFLINE          

4.添加asm资源:

[16:39:21][grid@11gasm1 grid]$  srvctl add asm -l LISTENER -p '' -d '/dev/asm-diskb'

[16:45:49][grid@11gasm1 grid]$ sqlplus / as sysasm

[16:45:49]

[16:45:49]SQL*Plus: Release 11.2.0.3.0 Production on Sun Sep 15 16:45:48 2013

[16:45:49]

[16:45:49]Copyright (c) 1982, 2011, Oracle.  All rights reserved.

[16:45:49]

[16:45:49]

[16:45:49]Connected to:

[16:45:49]Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

[16:45:49]With the Automatic Storage Management option

[16:45:49]

[16:45:50]SQL> select name from v$asm_diskgroup;

[16:45:51]

[16:45:51]NAME

[16:45:51]------------------------------

[16:45:51]DATA

[16:45:51]FRA

[16:45:51]

[16:46:12]SQL> alter diskgroup DATA mount;

[16:46:20]

[16:46:20]Diskgroup altered.

[16:46:20]

[16:46:28]SQL> alter diskgroup FRA mount;

[16:46:34]

[16:46:34]Diskgroup altered

5.增加db资源

[16:53:10][oracle@11gasm1 bin]$ ./srvctl add database -d zxy1 -o /u01/app/oracle/product/11.2.0/db_1 -p /u01/app/oracle/product/11.2.0/db_1/dbs/zxy1

再次查看crs资源信息:

[16:56:41][grid@11gasm1 dbs]$ crs_stat -t -v

[16:56:41]Name           Type           R/RA   F/FT   Target    State     Host       

[16:56:41]----------------------------------------------------------------------

[16:56:41]ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    11gasm1    

[16:56:41]ora.FRA.dg     ora....up.type 0/5    0/     ONLINE    ONLINE    11gasm1    

[16:56:41]ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    11gasm1    

[16:56:41]ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    11gasm1    

[16:56:41]ora.cssd       ora.cssd.type  0/5    0/5    ONLINE    ONLINE    11gasm1    

[16:56:41]ora.diskmon    ora....on.type 0/10   0/5    OFFLINE   OFFLINE              

[16:56:41]ora.evmd       ora.evm.type   0/10   0/5    ONLINE    ONLINE    11gasm1    

[16:56:41]ora.ons        ora.ons.type   0/3    0/     OFFLINE   OFFLINE              

[16:56:41]ora.zxy1.db    ora....se.type 0/2    0/1    ONLINE    ONLINE    11gasm1

全部注册成功,主机名也变成了11gasm1了。

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: