下午同事發來微信說在裝Oracle 11.2.0.4的RAC時,GI已經正常安裝了。但在安裝數據庫軟件的時候,圖形界面不顯示兩臺主機的主機名,沒辦法繼續往下安裝。因爲不在一塊兒,因而百度相應的文章來看,可是相關的文章也很少。找到一篇https://blog.csdn.net/MFW333/article/details/71122990,說是inventory.xml文件中缺乏了CRS = TRUE。node
因而轉給同事去檢查,反饋的結果是配置文件中是有這一項配置的:數據庫
那問題出在哪裏了呢,看來不是百度一下就能夠解決的。要來服務器信息,本身登陸上去看。其實一開始我以爲是/etc/hosts或hostname配置有錯誤致使的,可是登陸上去以後發現配置都沒有問題。因而本身執行./runInstaller實際看看,到了Grid Installation Options這一步時確是看不到主機的node name信息。因爲匆忙沒有截圖,同窗們能夠本身腦補一下就能夠了。服務器
心想沒有node name信息,看看日誌有沒有什麼報錯呢。可是很遺憾,沒有日誌。沒有日誌信息,就看不到報錯;沒有報錯,問題就很難排查。那就想,我直接點擊下一步看看會是什麼效果呢,結果出來了我想要的報錯信息:[INS-08109] Unexpected error occurred while validating inputs at state 'nodeSelectionPage'.微信
details裏竟然寫沒有多餘的信息,讓聯繫support或查詢手冊。support是沒有的,那先去MOS上查查相關文檔吧,還真有跟這個如出一轍的報錯信息的文檔。INS-08109 Unexpected error occurred While Validating Inputs At State 'nodeSelectionPage' (文檔 ID 948382.1)。文檔裏寫了7種緣由會致使的這種問題,並給出瞭解決辦法oracle
OUI calls $GRID_HOME/srvm/admin/getcrshome to get Grid Infrastructure home, if environment variable ORA_CRS_HOME is set to anything but GRID home, the error will be reported. In 11gR2, it's not supported to setup environment variable ORA_CRS_HOME.
The solution is to unset the environment variable and restart OUI.app
unset ORA_CRS_HOMEide
OUI calls "crsctl query crs activersion" to get active version of clusterware. If it fails to read olr.loc (if grid and database are owned differently), the issue can happen. From strace/truss:
open("/etc/oracle/olr.loc", O_RDONLY) = -1 EACCES (Permission denied)
The solution is to ensure that 'oracle' user has read permission on olr.loc in /etc/oracle or /var/opt/oracle.ui
This problem will occur while installing 11.2.0.4 RAC RDBMS software in a 12c Grid Infrastructure environment.spa
The solution is to set ORACLE_HOME environment variable pointing to GRID_HOME before installing RDBMS software.
export ORACLE_HOME=<GRID_HOME>
.net
This problem will occur if database user does not exist on all nodes in the cluster. For example, 4-node cluster, trying to install a new RAC DB home on two nodes only so the new DB user is created on two nodes. The solution is to have the same DB user on all nodes.
If NLS_LANG is set to "Japanese_Japan.JA16SJIS" etc, the issue will happen as output of "crsctl query crs activeversion" garbles.
The solution is to unset NLS_LANG.
6. ORA_NLS10 environment variable is set
environment variable is not necessary for Oracle 11g/12c
7. Hostnames in /etc/hosts are incorrect
This error is generated when trying to add new nodes into the cluster if the entries for the hostnames
in /etc/hosts is incorrect.
看來看去,好像只有第二條比較符合咱們當前遇到的問題,因而去機器看olr.loc的權限狀況
又執行了命令crsctl query crs activeversion,也是能夠執行成功的。(這裏其實mos的文章裏寫錯了,activeversion寫成了activersion。)
再執行olsnode -n,也是能夠識別到兩個節點
集羣也是正常狀態
看起來也是有讀權限的。那問題怎麼解決呢?又看了幾篇MOS上的文檔,又百度了一些貼子,感受通常別人遇到的問題就已經在上面7條裏已經列出來了。但我遇到的問題卻沒有列出來。難道又是BUG?想一想應該不可能,這麼點小事就出BUG,那Oracle也不可能一下強大到如今。那問題到底出如今哪裏呢?
其實這時我陷入到了思惟定式裏了,把一些我認爲不可能出問題的地方忽略掉了,偏偏此次出問題的,正是這個地方。
其實仍是權限問題,只不過不僅是olr.loc的權限問題,而是整個oracle用戶的權限問題。看了不少文章都說是權限問題,我就想,那我看看oracle用戶配置的uid和所屬組吧,當我執行完id oracle命令看到結果時,瞬間明白了問題的根本緣由,就是權限問題。
熟悉oracle的同窗應該一眼就能看出來,這個oracle用戶配置的所屬組是徹底錯的。這也就成了形成這次問題的關鍵。把oracle用戶刪掉從新建立,問題完美解決:
寫這篇博客,一個是給你們提供一個解決問題的思路,再一個就是提醒本身,不是「你覺得的就是你覺得的」,仍是須要仔細的去驗證分析。