无法启动Service CRS-0215解决
环境:10.2.0.5on Linux
三个节点SDB1 ,SDB2 ,SDB3
问题描述:servicerac只在RACTEST1上是prefered 实例,现预添加RACTEST2为另一个prefered。配置如下:
//初始只有一个instance为prefered
[root@sdb1 log]# srvctl config service -d RACTEST-s rac
rac PREF: RACTEST1 AVAIL:
//使用以下命令增加一个prefered实例
[root@sdb1 log]# srvctl modify service -d RACTEST-s rac -n -I RACTEST1,RACTEST2
增加后,手工启动在RACTEST2上的rac service,出现以下提示:
[root@sdb1 log]# srvctl start service -d RACTEST -srac -i RACTEST1
PRKP-1030 : Failed to start the service rac.
CRS-0215: Could not start resource'ora.RACTEST.rac.RACTEST1.srv'.
问题排查:
根据文档ID 781632.1查看$ORACLE_HOME/log/sdb1/racg/ora.RACTEST.test_service.RACTEST2.srv.log
里面提示:
2015-08-25 08:35:43.807: [ COMMCRS][1600829152]Authorizationfailed, network error
2015-08-25 08:36:47.811: [ COMMCRS][1600829152]Authorizationfailed, network error
2015-08-25 08:36:47.811: [ RACG][1600829152] [7698][1600829152][ora.RACTEST.test_service.RACTEST2.srv]:clsrdcconnect() failed, too many retries.
2015-08-25 08:36:47.811: [ RACG][1600829152][7698][1600829152][ora.RACTEST.test_service.RACTEST2.srv]: clsrcremaction:clsrcstartd returned -1
2015-08-25 08:36:47.811: [ RACG][1600829152][7698][1600829152][ora.RACTEST.test_service.RACTEST2.srv]: end for resource =ora.RACTEST.test_service.RACTEST2.srv, action = stop, status = 1, time =127.010s
开启srvctltrace功能
export SRVM_TRACE=TRUE
然后再执行失败的命令:
PRKP-1030 : Failed to start the service rac.
CRS-0254: authorization failure
参考文档:CRS Does Not Start/Stop Resources (文档 ID 378357.1)
srvctl Stop Database fails with PRKP-1002and CRS-0254:Authorization failure (文档 ID 550849.1)
由于创建该service的用户的oracle,但是在修改service的帐号是root。两个帐号不一致造成在启动的时候出现验证错误。
如果一直使用oracle帐号创建及修改服务,就不会出现这种现象
如下命令可以查看每个资源的权限:
ocrdump -stdout -keynameDATABASE.DATABASES.ractest.SERVICE.rac
[DATABASE.DATABASES.ractest.dsafdfsa.rac]
ORATEXT : rac
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS,GROUP_PERMISSION : PROCR_WRITE, OTHER_PERMISSION : PROCR_READ, USER_NAME :oracle, GROUP_NAME : dba}
[DATABASE.DATABASES.ractest.SERVICE.rac.INSTANCES]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS,GROUP_PERMISSION : PROCR_WRITE, OTHER_PERMISSION : PROCR_READ, USER_NAME :root, GROUP_NAME : root}
[DATABASE.DATABASES.ractest.SERVICE.rac.INSTANCES.ractest1]
ORATEXT : RACTEST1
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS,GROUP_PERMISSION : PROCR_WRITE, OTHER_PERMISSION : PROCR_READ, USER_NAME :oracle, GROUP_NAME : dba}
[DATABASE.DATABASES.ractest.SERVICE.rac.INSTANCES.ractest1.TYPE]
ORATEXT : PREFERRED
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS,GROUP_PERMISSION : PROCR_WRITE, OTHER_PERMISSION : PROCR_READ, USER_NAME :oracle, GROUP_NAME : dba}
[DATABASE.DATABASES.ractest.SERVICE.rac.INSTANCES.ractest1.ENABLED]
ORATEXT : true
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS,GROUP_PERMISSION : PROCR_WRITE, OTHER_PERMISSION : PROCR_READ, USER_NAME :oracle, GROUP_NAME : dba}
[DATABASE.DATABASES.ractest.SERVICE.rac.INSTANCES.ractest2]
ORATEXT : RACTEST2
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS,GROUP_PERMISSION : PROCR_WRITE, OTHER_PERMISSION : PROCR_READ, USER_NAME :oracle, GROUP_NAME : dba}