RAC環境有節點vip不起作用,但檢視其他狀態都正常,檢視grid的監聽日誌報錯,已解決

君落塵發表於2014-11-05
路徑:
[grid@mi6 trace]$ cd /u01/app/oracle/diag/tnslsnr/mi6/listener/trace
[grid@mi6 trace]$ 
[grid@mi6 trace]$ tail -200 listener.log 




[grid@mi7 trace]$ tail -f listener.log 
30-OCT-2014 11:16:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=mi)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=2))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.10.11)(PORT=42751)) * establish * mi * 0
30-OCT-2014 11:16:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=mi)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=2))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.10.11)(PORT=42752)) * establish * mi * 0
30-OCT-2014 11:16:13 * service_update * mi2 * 0
30-OCT-2014 11:16:14 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=mi)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=2))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.10.11)(PORT=42767)) * establish * mi * 0
30-OCT-2014 11:16:14 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=mi)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=2))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.10.11)(PORT=42768)) * establish * mi * 0
Thu Oct 30 11:16:16 2014
30-OCT-2014 11:16:16 * service_update * mi2 * 0
Thu Oct 30 11:16:43 2014
30-OCT-2014 11:16:43 * service_update * mi2 * 0
30-OCT-2014 11:16:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=mi7)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)) * status * 0






[grid@mi6 trace]$ tail -f listener.log 
   TNS-00517: Lost contact
    Linux Error: 32: Broken pipe
30-OCT-2014 11:16:14 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=mi)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=2))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.10.11)(PORT=60505)) * establish * mi * 12518
TNS-12518: TNS:listener could not hand off client connection
 TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
    Linux Error: 32: Broken pipe
Thu Oct 30 11:16:17 2014
30-OCT-2014 11:16:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=mi6)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)) * status * 0
Thu Oct 30 11:17:17 2014
30-OCT-2014 11:17:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=mi6)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)) * status * 0
30-OCT-2014 11:17:19 * service_update * +ASM1 * 0


******************
許可權設定有問題
解決辦法如下
1、檢視
第一個節點(不正常狀態)
[oracle@mi6 bin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/bin
[oracle@mi6 bin]$ 
[oracle@mi6 bin]$ ls -l $ORACLE_HOME/bin/oracle
-r-xr-sr-x 1 oracle asmadmin 210824720 Oct 12 12:19 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
第二個節點(正常狀態)
[oracle@mi7 bin]$ ls -l $ORACLE_HOME/bin/oracle
-r-sr-s--x 1 oracle asmadmin 210824720 Oct 12 12:23 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
兩個節點上的許可權不一致,節點一的oracle使用者真的少了setuid


2、修改許可權,把節點一的許可權修改為跟節點二一樣
[oracle@mi6 bin]$ chmod u+s oracle
[oracle@mi6 bin]$ chmod o-r oracle


檢視是否和節點二一樣
[oracle@mi6 bin]$ ls -l $ORACLE_HOME/bin/oracle
-r-sr-s--x 1 oracle asmadmin 210824720 Oct 12 12:19 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
如果不一樣再修改
我出現的情況是:
1)修改完後組的s許可權沒了
[oracle@mi6 bin]$ ls -l $ORACLE_HOME/bin/oracle
-r-sr-x--x 1 oracle asmadmin 210824720 Oct 12 12:19 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
2)再新增授權
[oracle@mi6 bin]$ chmod g+s oracle
檢視,發現還沒有改變
[oracle@mi6 bin]$ ls -l $ORACLE_HOME/bin/oracle
-r-sr-x--x 1 oracle asmadmin 210824720 Oct 12 12:19 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
3)檢視資料庫的告警日誌
[oracle@mi6 ~]$ tail -f /u01/app/oracle/diag/rdbms/mi/mi1/trace/alert_mi1.log 
發現節點一的例項掛掉了
再用命令檢視,確實掛掉了
[root@mi6 ~]# srvctl status database -d mi
Instance mi1 is not running on node mi6
Instance mi2 is running on node mi7
4)單獨啟動節點一的例項,再檢視
[root@mi6 ~]# srvctl start  instance  -d mi -i mi1
[root@mi6 ~]# srvctl status database -d mi
Instance mi1 is running on node mi6
Instance mi2 is running on node mi7
5)節點一的例項起來後,發現許可權也改變成和節點二一樣了
[oracle@mi6 bin]$ ls -l $ORACLE_HOME/bin/oracle
-r-sr-s--x 1 oracle asmadmin 210824720 Oct 12 12:19 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
6)在客戶端修改tnsnames,分別用各自的vip地址連線資料庫檢視,是否都可以正常登入




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

相關文章