ORACLE 11g RAC時鐘同步問題

murkey發表於2015-04-14
      近一段,客戶資料庫累積了一些問題,需要我集中處理,有些相對容易,有些有一點棘手,可能需要透過SR提交服務。我陸續將所碰到問題及解決方案總結一下。
     首先是HP-UX和AIX平臺上出現時間同步警告資訊,具體日誌如下:

2014-01-16 15:48:10.885

[ctssd(15073486)]CRS-2409:The clock on host node2 is not synchronous with the mean cluster time. No action has been taken as the Cluster Time Synchronization Service is running in observer mode.


原理描述:

     11g Clusterware引入一個新的程式CTSS,該程式主要負責叢集的時間管理,確保每個節點的叢集時間一致,如果系統的NTP程式執行,則CTSS程式處於observer模式,否則,NTP程式沒有執行,CTSS執行於ACTIVE模式。

問題分析及解決

   執行cluvfy命令進行節點的時間同步,出現如下錯誤:

#su – grid

$cluvfy comp clocksync –n all –verbose

執行失敗,出現如以下錯誤:

執行失敗,如:

  Version of exectask could not be retrieved from node “node1”

  Version of exectask could not be retrieved from node “node1”

ERROR:

   Framework setup check failed on all the nodes

   Verification cannot processed

    命令cluvfy執行出現錯誤,主要從以下三個方面進行解決:
  1、檢查兩個節點直接的信任關係,否則執行sshUserSetup.sh指令碼,該指令碼可透過解壓安裝包獲得。

# sshUserSetup.sh -user grid -hosts "oadb1 oadb2" -advanced –PromptPassphrase

2、清除臨時檔案系統中以CVU開頭的檔案目錄。

# rm –rf /tmp/CVU*

3、因為資料庫升級,會改變exectask*命令執行許可權,需要更改該指令碼執行許可權

# su – grid

$ cd $ORACLE_HOME/cv/remenv

$chmod 755 ./*

重新執行cluvfy指令碼,依然無法同步,具體資訊如下:

$ cluvfy comp clocksync –n all –verbose

輸出資訊如下:

Verifying Clock Synchronization across the cluster nodes

Checking if Clusterware is installed on all nodes...

Check of Clusterware install passed

 

Checking if CTSS Resource is running on all nodes...

Check: CTSS Resource running on all nodes

  Node Name                             Status                 

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

   node1                              passed                  

  node2                              passed                 

Result: CTSS resource check passed

 

Querying CTSS for time offset on all nodes...

Result: Query of CTSS for time offset passed

 

Check CTSS state started...

Check: CTSS state

  Node Name                             State                  

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

  node2                              Observer               

  node1                              Observer               

CTSS is in Observer state. Switching over to clock synchronization checks using NTP

 

Starting Clock synchronization checks using Network Time Protocol(NTP)...

 

NTP Configuration file check started...

The NTP configuration file "/etc/ntp.conf" is available on all nodes

NTP Configuration file check passed

 

Checking daemon liveness...

 

Check: Liveness for "xntpd"

  Node Name                             Running?               

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

  node2                              yes                    

  node1                              yes                    

Result: Liveness check passed for "xntpd"

Check for NTP daemon or service alive passed on all nodes

 

Checking NTP daemon command line for slewing option "-x"

Check: NTP daemon command line

  Node Name                             Slewing Option Set?    

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

  node2                              no                     

  node1                              no                     

Result:

NTP daemon slewing option check failed on some nodes

PRVF-5436 : The NTP daemon running on one or more nodes lacks the slewing option "-x"

Result: Clock synchronization check using Network Time Protocol(NTP) failed

 

PRVF-9652 : Cluster Time Synchronization Services check failed

Verification of Clock Synchronization across the cluster nodes was unsuccessful on all the specified nodes.

以上可以看出xntpd程式執行未使用引數”-x”,在所有節點“系統啟動配置檔案”檢查並新增該引數,然後各個節點重新啟動時間同步:

1、AIX平臺配置檔案:

     #vi /etc/rc.tcpip

       start /usr/sbin/xntpd "$src_running" "-x"

2、HP-UX平臺配置檔案:

     #vi /etc/rc.config.d/netdaemons

        XNTPD_ARGS="-x"

3、AIX停止和啟動XNTPD程式

     #stopsrc –s xntpd

     #startsrc –s xntpd –a “-x”

4、HP-UX停止和啟動XNTPD程式

     #/sbin/init.d/xntpd stop

     #/sbin/init.d/xntpd start
完成以上命令後,各個節點重新執行cluvfy comp clocksysnc –n all –verbose,時間同步成功。


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

相關文章