grid監聽故障,本地地址不能連線

xychong123發表於2018-05-31
SQL*Plus: Release 12.2.0.1.0
Red Hat Enterprise Linux Server release 6.8 (Santiago)


資料庫監聽存在問題,tnsping資料庫固定10.95.10.5不能連線資料庫。




10.95.10.5 db03
192.95.10.5 db03-priv
10.95.10.6 db03-vip


故障現象:
tnsping  10.95.10.5


TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:09:16


Copyright (c) 1997, 2016, Oracle.  All rights reserved.


Used parameter files:
/u01/soft/network/admin/sqlnet.ora


Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.95.10.5)(PORT=1521)))
TNS-12541: TNS:no listener










資料庫為叢集環境:


grid 檢視資料庫監聽:


[grid@db03 ~]$ lsnrctl  status


LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:06:19


Copyright (c) 1991, 2016, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                31-MAY-2018 13:25:42
Uptime                    0 days 0 hr. 40 min. 36 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/soft/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "wsjr" has 1 instance(s).
  Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
  Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully




oracle 檢視資料庫監聽:
[oracle@db03 ~]$ lsnrctl  status


LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:10:14


Copyright (c) 1991, 2016, Oracle.  All rights reserved.


Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused




檢查/etc/hosts:
[oracle@db03 ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 db03
10.95.10.1 db01
192.95.10.1 db01-priv
10.95.10.3 db02
192.95.10.3 db02-priv
10.95.10.5 db03
192.95.10.5 db03-priv
10.95.10.7 db04
192.95.10.7 db04-priv
10.95.10.10 scan
10.95.10.2 db01-vip
10.95.10.4 db02-vip
10.95.10.6 db03-vip
10.95.10.8 db04-vip


測試主機ping:


oracle@db03 ~]$ ping db03
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.028 ms






故障解決方案:
1,刪除hosts檔案 第二行 主機名稱:
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 db03 《《======刪除db03!!
2,使用grid使用者重啟監聽程式
lsnrctl stop 
lsnrctl start


3,故障解決
[grid@db03 ~]$ lsnrctl status


LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:14:10


Copyright (c) 1991, 2016, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                31-MAY-2018 14:14:01
Uptime                    0 days 0 hr. 0 min. 8 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/soft/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.5)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "wsjr" has 1 instance(s).
  Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
  Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully




[oracle@db03 ~]$ lsnrctl  status


LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:14:32


Copyright (c) 1991, 2016, Oracle.  All rights reserved.


Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                31-MAY-2018 14:14:01
Uptime                    0 days 0 hr. 0 min. 30 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/soft/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.5)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "wsjr" has 1 instance(s).
  Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
  Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully

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

相關文章