監聽無響應,同時發現兩個Listener

環境:Linux 4.7 + Oracle 10g Version 10.2.0.1.0

故障現象:

[oracle@dbserv ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-JUN-2012 10:15:56

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

...無響應…

[oracle@dbserv ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-JUN-2012 10:17:32

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

...無響應…

網上資料說,這個問題被最終確認爲一個BUG,BUG號爲:4518443,如下是診斷及具體處理過程:


查看日誌,正常:

[oracle@dbserv ~]$ cd /oracle/admin/test/bdump/

[oracle@dbserv bdump]$ tail -100lf alert_test.log

Thread 1 advanced to log sequence 1600

Current log# 1 seq# 1600 mem# 0: /oradata/test/redo01.log

Sun Jun 24 12:00:14 2012

Thread 1 advanced to log sequence 1601

Current log# 2 seq# 1601 mem# 0: /oradata/test/redo02.log

Mon Jun 25 05:40:49 2012

Thread 1 advanced to log sequence 1602

Current log# 3 seq# 1602 mem# 0: /oradata/test/redo03.log

發現兩個監聽進程:

[oracle@dbserv ~]$ ps -ef | grep tnslsnr

oracle 1307710 Jun21 ?00:00:14 /oracle/product/10.2.0/bin/tnslsnr LISTENER -inherit

oracle23977 227080 10:24 pts/200:00:00 grep tnslsnr

oracle24120 130770 Jun23 ?00:00:00 /oracle/product/10.2.0/bin/tnslsnr LISTENER -inherit

在這裏出現兩個Listener進程,而且一個進程和另一個的子進程。如下刪除了子進程後,系統恢復正常:

[oracle@dbserv ~]$ kill -9 24120

[oracle@dbserv ~]$ ps -ef | grep tnslsnr

oracle1307710 Jun21 ?00:00:14 /oracle/product/10.2.0/bin/tnslsnr LISTENER -inherit

oracle24733 227080 10:28 pts/200:00:00 grep tnslsnr

[oracle@dbserv ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-JUN-2012 10:28:30

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

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

AliasLISTENER

VersionTNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date21-JUN-2012 02:14:36

Uptime4 days 8 hr. 13 min. 53 sec

Trace Leveloff

SecurityON: Local OS Authentication

SNMPON

Listener Parameter File/oracle/product/10.2.0/network/admin/listener.ora

Listener Log File/oracle/product/10.2.0/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserv)(PORT=1521)))

Services Summary...

Service "test" has 1 instance(s).

Instance "test", status READY, has 1 handler(s) for this service...

Service "testXDB" has 1 instance(s).

Instance "test", status READY, has 1 handler(s) for this service...

Service "test_XPT" has 1 instance(s).

Instance "test", status READY, has 1 handler(s) for this service...

The command completed successfully

[oracle@dbserv ~]$ lsnrct reload

-bash: lsnrct: command not found

[oracle@dbserv ~]$

故障恢復正常,如果此時監聽還是無響應,則可以Kill另一個Listener進程後重啓監聽即可。

在非RAC環境下,在Listener上增加

SUBSCRIBE_FOR_NODE_DOWN_EVENT_<listener_name>=OFF

參數也能避免該Oracle Bug

在linstener上增加參數:

[oracle@dbserv admin]$ vi listener.ora

# listener.ora Network Configuration File: /oracle/product/10.2.0/network/admin/listener.ora

# Generated by Oracle configuration tools.

SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_TEST=OFF

SID_LIST_LISTENER_test =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /oracle/product/10.2.0)

(PROGRAM = extproc)

)

)

LISTENER_test=

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))

(ADDRESS = (PROTOCOL = TCP)(HOST = dbserv)(PORT = 1521))

)

)

 

轉自:http://blog.itpub.net/post/38575/527965

解決參開:http://qbaok.blog.163.com/blog/static/101292652009827113945863/

http://www.eygle.com/archives/2007/06/tns_child_listener_forked.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章