【RAC安裝故障】multiple user has uid 0

lhrbest發表於2016-03-03

RAC安裝故障處理】multiple user has uid 0

一.1  BLOG文件結構圖

wpsB855.tmp 

 

 

一.2  前言部分

 

一.2.1  導讀和注意事項

各位技術愛好者,看完本文後,你可以掌握如下的技能,也可以學到一些其它你所不知道的知識,~O(∩_∩)O~:

RAC安裝類似如下錯誤的解決方案:

USERS WITH SAME UID

multiple user has uid 0

PROC-5: User does not have permission to perform a cluster registry operation on this key

add scan=ZFPRMDB-scan ... failed

FirstNode configuration failed at /oracle/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 9196.

 

  Tips:

       ① 若文章程式碼格式有錯亂,推薦使用搜狗、QQ360瀏覽器,也可以下載pdf格式的文件來檢視,pdf文件下載地址:http://yunpan.cn/cdEQedhCs2kFz (提取碼:ed9b 

       ② 本篇BLOG中命令的輸出部分需要特別關注的地方我都用灰色背景和粉紅色字型來表示,比如下邊的例子中,thread 1的最大歸檔日誌號為33thread 2的最大歸檔日誌號為43是需要特別關注的地方;而命令一般使用黃色背景和紅色字型注;對程式碼或程式碼輸出部分的注釋一般採用藍色字型表示

 

  List of Archived Logs in backup set 11

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time

  ---- ------- ---------- ------------------- ---------- ---------

  1    32      1621589    2015-05-29 11:09:52 1625242    2015-05-29 11:15:48

  1    33      1625242    2015-05-29 11:15:48 1625293    2015-05-29 11:15:58

  2    42      1613951    2015-05-29 10:41:18 1625245    2015-05-29 11:15:49

  2    43      1625245    2015-05-29 11:15:49 1625253    2015-05-29 11:15:53

 

 

 

[ZFXXDB1:root]:/>lsvg -o

T_XDESK_APP1_vg

rootvg

[ZFXXDB1:root]:/>

00:27:22 SQL> alter tablespace idxtbs read write;

 

 

====》2097152*512/1024/1024/1024=1G 

 

 

 

 

 

本文如有錯誤或不完善的地方請大家多多指正,ITPUB留言或QQ皆可,您的批評指正是我寫作的最大動力。

 

 

 

一.2.2  相關參考文章連結

 

一.3  相關知識點掃盲

 

Rac安裝中,最重要的一步是安裝grid的時候執行root.sh指令碼,這個可以成功,基本rac可以安裝成功,安裝rac之前可以使用runcluvfy.sh指令碼來檢查安裝環境

 

---  GRID校驗,這裡的ORACLE_HOME指的是GRID_HOME 

./runcluvfy.sh stage -pre crsinst -n all -verbose

$ORACLE_HOME/bin/cluvfy stage  -pre crsinst -n all  -verbose

 

 

---------------------------------------重新執行root.sh指令碼的2種方式,這裡的ORACLE_HOME指的是GRID_HOME 

--------------① 指令碼方式

---執行失敗,重新執行root.sh指令碼 

---$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose

--dd if=/dev/zero of=/dev/rhdiskN bs=1024k count=1024

--lquerypv -h  /dev/rhdisk5

--$ORACLE_HOME/root.sh

 

--------------② 介面方式

---------------刪除兩節點crsconfig_params中的DATA1和磁碟

$ORACLE_HOME/crs/install/crsconfig_params

ASM_DISK_GROUP=DATA1

ASM_DISKS=/dev/rhdisk5

--root執行

$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose

-- GRID 執行

export DISPLAY=22.188.216.132:0.0

$ORACLE_HOME/crs/config/config.sh

 

 

 

 

 

 

 

 

 

一.4  故障分析及解決過程

 

一.4.1  故障環境介紹

 

專案

source db

db 型別

RAC

db version

11.2.0.3

db 儲存

ASM

OS版本及kernel版本

AIX 646.1.0.0

 

 

一.4.2  故障發生現象及報錯資訊

USERS WITH SAME UID

multiple user has uid 0

PROC-5: User does not have permission to perform a cluster registry operation on this key

 

靜默安裝報錯資訊:

PRCR-1006 : Failed to add resource ora.scan1.vip for scan1

PRCR-1071 : Failed to register or update resource ora.scan1.vip

PROC-5: User does not have permission to perform a cluster registry operation on this key.

add scan=ZFPRMDB-scan ... failed

FirstNode configuration failed at /oracle/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 9196.

 

 

PRCR-1006 : Failed to add resource ora.net1.network for net1

PRCR-1071 : Failed to register or update resource ora.net1.network

PROC-5: User does not have permission to perform a cluster registry operation on this key.

add nodeapps -n zfprmdb1 -A ZFPRMDB1-vip/255.255.255.0/en0 on node=zfprmdb1 ... failed

Failed to add  Nodeapps at /oracle/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 9190.

/oracle/app/11.2.0/grid/perl/bin/perl -I/oracle/app/11.2.0/grid/perl/lib -I/oracle/app/11.2.0/grid/crs/install /oracle/app/11.2.0/grid/crs/install/rootcrs.pl execution failed

 

 

 

 

[main] [ 2016-02-29 09:16:16.124 GMT+08:00 ] [ScanImpl.initialize:111]  NEE message = PRCS-1025 : Could not find Single Client Access Name Virtual Internet Protocol(VIP) resources TYPE=ora.scan_vip.type

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

        at java.util.ArrayList.RangeCheck(ArrayList.java:572)

        at java.util.ArrayList.get(ArrayList.java:347)

        at oracle.cluster.impl.scan.ScanImpl.getScanName(ScanImpl.java:235)

        at oracle.sysman.assistants.util.hasi.HAUtils.getScanName(HAUtils.java:2416)

        at oracle.sysman.assistants.util.hasi.HAUtils.getScanEZConnectString(HAUtils.java:2928)

        at oracle.sysman.assistants.util.attributes.InitParamAttributes.configureRemoteListener(InitParamAttributes.java:2941)

        at oracle.sysman.assistants.dbca.backend.Host.createOPSConfiguration(Host.java:1226)

        at oracle.sysman.assistants.dbca.backend.SilentHost.performOperation(SilentHost.java:234)

        at oracle.sysman.assistants.dbca.backend.Host.startOperation(Host.java:3613)

        at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:119)

        at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:180)

 

使用圖形介面安裝報錯:

wpsB875.tmp 

wpsB876.tmp 

 

 

 

 

一.4.3  故障分析及解決過程

先查詢了一下metalink上的文章,找到了一篇Errors PRCR-1006 PRCR-1071 PROC-5 reported during GI installation as multiple user has uid 0 (文件 ID 2012626.1),應該就是我的問題了,按照文章的介紹,刪除了多餘的使用者,重新執行root.sh就可以了。

 

原因:有和root使用者一樣的uid使用者,刪除該使用者,解決過程如下:

[ZFXXX2:root]:/>more /etc/passwd

root:!:0:0:672/F/*BOCSUP//BOC System Super ID:/:/usr/bin/ksh

daemon:!:1:1:672/S/*BOCAIX//BOC AIX Linux system build in ID:/etc:

bin:!:2:2:672/S/*BOCAIX//BOC AIX Linux system build in ID:/bin:

sys:!:3:3:672/S/*BOCAIX//BOC AIX Linux system build in ID:/usr/sys:

adm:!:4:4:672/S/*BOCAIX//BOC AIX Linux system build in ID:/var/adm:

uucp:!:5:5:672/S/*BOCAIX//BOC AIX Linux system build in ID:/usr/lib/uucp:

guest:!:100:100:672/S/*BOCAIX//BOC AIX Linux system build in ID:/home/guest:

nobody:!:4294967294:4294967294:672/S/*BOCAIX//BOC AIX Linux system build in ID:/:

lpd:!:9:4294967294:672/S/*BOCAIX//BOC AIX Linux system build in ID:/:

lp:*:11:11:672/S/*BOCAIX//BOC AIX Linux system build in ID:/var/spool/lp:/bin/false

invscout:*:6:12:672/S/*BOCAIX//BOC AIX Linux system build in ID:/var/adm/invscout:/usr/bin/ksh

snapp:*:200:13:672/S/*BOCAIX//BOC AIX Linux system build in ID:/usr/sbin/snapp:/usr/sbin/snappd

ipsec:*:201:1:672/S/*BOCAIX//BOC AIX Linux system build in ID:/etc/ipsec:/usr/bin/ksh

nuucp:*:7:5:672/S/*BOCAIX//BOC AIX Linux system build in ID:/var/spool/uucppublic:/usr/sbin/uucp/uucico

pconsole:*:8:0:672/S/*BOCAIX//BOC AIX Linux system build in ID:/var/adm/pconsole:/usr/bin/ksh

esaadmin:*:10:0:672/S/*BOCAIX//BOC AIX Linux system build in ID:/var/esa:/usr/bin/ksh

sshd:*:202:201:672/S/*BOCAIX//BOC AIX Linux system build in ID:/var/empty:/usr/bin/ksh

prmwas:!:203:202:672/C//BOC/ - app user ID:/home/prmwas:/usr/bin/ksh

mon:*:301:1::/home/mon:/usr/bin/ksh

pwd_user:!:0:0::/home/pwd_user:/usr/bin/ksh

sysoper:!:1365:1::/home/sysoper:/usr/bin/ksh

grid:!:1025:1024::/home/grid:/usr/bin/ksh

oracle:!:1024:1024::/oracle:/usr/bin/ksh

 

 

[ZFXXX2:root]:/>lsuser ALL|grep id=0

root id=0 pgrp=system groups=system,bin,sys,security,cron,audit,lp,tivlogs home=/ shell=/usr/bin/ksh gecos=672/F/*BOCSUP//BOC System Super ID auditclasses=general login=true su=false rlogin=false daemon=true admin=true sugroups=sysadm admgroups=asmoper,asmdba,asmadmin,dba,was tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=27 registry=files SYSTEM=compat logintimes= loginretries=8 pwdwarntime=0 account_locked=false minage=0 maxage=4 maxexpired=-1 minalpha=1 minloweralpha=0 minupperalpha=0 minother=1 mindigit=0 minspecialchar=0 mindiff=6 maxrepeats=2 minlen=8 histexpire=40 histsize=8 pwdchecks= dictionlist= default_roles= fsize=-1 cpu=-1 data=-1 stack=-1 core=-1 rss=-1 nofiles=-1 fsize_hard=-1 cpu_hard=-1 data_hard=-1 stack_hard=-1 core_hard=-1 rss_hard=-1 nofiles_hard=-1 time_last_login=1456711975 time_last_unsuccessful_login=1456469618 tty_last_login=/dev/pts/0 tty_last_unsuccessful_login=/dev/vty0 host_last_login=22.188.216.132 host_last_unsuccessful_login=ZFXXX2 unsuccessful_login_count=0 roles=

pwd_user id=0 pgrp=system groups=system,staff home=/home/pwd_user shell=/usr/bin/ksh auditclasses=Priv,KeyFile login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=27 registry=files SYSTEM=compat logintimes= loginretries=8 pwdwarntime=0 account_locked=false minage=0 maxage=4 maxexpired=-1 minalpha=1 minloweralpha=0 minupperalpha=0 minother=1 mindigit=0 minspecialchar=0 mindiff=6 maxrepeats=2 minlen=8 histexpire=40 histsize=8 pwdchecks= dictionlist= default_roles= fsize=-1 cpu=-1 data=-1 stack=-1 core=-1 rss=-1 nofiles=-1 time_last_login=1434012632 tty_last_login=/dev/pts/0 host_last_login=21.122.132.175 unsuccessful_login_count=0 roles=

 

[ZFXXX2:root]:/>rmuser pwd_user

[ZFXXX2:root]:/>lsuser ALL|grep id=0

root id=0 pgrp=system groups=system,bin,sys,security,cron,audit,lp,tivlogs home=/ shell=/usr/bin/ksh gecos=672/F/*BOCSUP//BOC System Super ID auditclasses=general login=true su=false rlogin=false daemon=true admin=true sugroups=sysadm admgroups=asmoper,asmdba,asmadmin,dba,was tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=27 registry=files SYSTEM=compat logintimes= loginretries=8 pwdwarntime=0 account_locked=false minage=0 maxage=4 maxexpired=-1 minalpha=1 minloweralpha=0 minupperalpha=0 minother=1 mindigit=0 minspecialchar=0 mindiff=6 maxrepeats=2 minlen=8 histexpire=40 histsize=8 pwdchecks= dictionlist= default_roles= fsize=-1 cpu=-1 data=-1 stack=-1 core=-1 rss=-1 nofiles=-1 fsize_hard=-1 cpu_hard=-1 data_hard=-1 stack_hard=-1 core_hard=-1 rss_hard=-1 nofiles_hard=-1 time_last_login=1456711975 time_last_unsuccessful_login=1456469618 tty_last_login=/dev/pts/0 tty_last_unsuccessful_login=/dev/vty0 host_last_login=22.188.216.132 host_last_unsuccessful_login=ZFXXX2 unsuccessful_login_count=0 roles=

 

 

諮詢過系統方面的同事,這個使用者沒有用,就直接刪除了,後邊就是重新執行root.sh指令碼了:

---執行失敗,重新執行root.sh指令碼,這裡的ORACLE_HOME指的是GRID_HOME 

---$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose

--dd if=/dev/zero of=/dev/rhdiskN bs=1024k count=1024

--lquerypv -h  /dev/rhdisk5

--$ORACLE_HOME/root.sh

 

 

 

 

一.4.3.1  Metalink上的文章

Errors PRCR-1006 PRCR-1071 PROC-5 reported during GI installation as multiple user has uid 0 (文件 ID 2012626.1)

In this Document

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.1.0 and later
Generic Linux
Generic UNIX

SYMPTOMS

When attempting to run root.sh after GI installation, the following error occurs.

-----------------------
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 78eb8dc1dbc64f95bf67d18e1ec11b0b (/dev/dev1) [OCR]
2. ONLINE 41936b8b5c9b4f0dbf086589f51537f8 (/dev/dev2) [OCR]
3. ONLINE 478aa42090794f8cbf5fe01c3601b84d (/oracle/app/votedisk/dev3) [OCR]
Located 3 voting disk(s).
PRCR-1006 : failed to add resource: ora.net1.network
PRCR-1071 : failed to register or update resource : ora.net1.network
PROC-5: User does not have permission to perform a cluster registry operation on this key.
add nodeapps -n hqspsl-cgam-r01 -A hqspsl-cgam-r01-vip/255.255.255.128/bond0 on node=hqspsl-cgam-r01 ... failed

 

CAUSE

Some user is  sharing uid as with root user .
 
Verified it in /etc/passwd 

.....
root:x:0:0:root:/root:/bin/bash
......
SuperUser :x:0:100::/home/SuperMan:/bin/bash <<<=======The SuperUser is sharing the same uid 0
 

SOLUTION

Do not have uid 0 for user other than root

 

 

一.5  故障處理總結

① 由於安裝過程是客戶直接寫的shell指令碼的方式,不容易看出錯誤,也沒有找見指令碼runcluvfy.sh,所以安裝失敗的時候比較糾結,畢竟靜默安裝給出的錯誤有的時候不是很明顯,安裝GRID之前,儘量使用指令碼./runcluvfy.sh stage -pre crsinst -n all -verbose來預檢查安裝環境。

  ② 其實該錯誤使用圖形介面的時候已經給出的很明顯了,rootpwd_user使用者有相同的uid,都為0

 

wpsB887.tmp 

 

 

About Me

 

...........................................................................................................................................................................................

本文作者:小麥苗,只專注於資料庫的技術,更注重技術的運用

ITPUB BLOG:http://blog.itpub.net/26736162

本文地址:http://blog.itpub.net/26736162/viewspace-2029482/

本文pdf版:http://yunpan.cn/cdEQedhCs2kFz (提取碼:ed9b)

QQ:642808185 若加QQ請註明所正在讀的文章標題

2016-03-01 10:00~ 2016-03-02 19:00 在中行完成

<版權所有,文章允許轉載,但須以連結方式註明源地址,否則追究法律責任!>

...........................................................................................................................................................................................

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2029482/,如需轉載,請註明出處,否則將追究法律責任。

相關文章