TNS-12537監聽程式啟不來

kuqlan發表於2012-07-11

環境:Linux AS 4.7 + Oracle10g

一次的異常斷電事故,導致Oracle資料庫監聽啟動不起來,不如下錯誤:

[oracle@dbserv ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUL-2012 10:50:13

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

Starting /var/oracle/product/10.2.0/database/bin/tnslsnr: please wait...

TNS-12537: TNS:connection closed

TNS-12560: TNS:protocol adapter error

TNS-00507: Connection closed

Linux Error: 29: Illegal seek

[@more@]

LSNRCTL> status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv)(PORT=1521)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 111: Connection refused

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 111: Connection refused

檢視listener檔案內容,屬於正常:

[oracle@dbserv admin]$ more listener.ora

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

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /var/oracle/product/10.2.0/database)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

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

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

)

)

在圖形桌面環境,透過netca刪除並重建資料庫監聽(LISTENER,但啟動監聽還是報同樣的錯誤。

檢視了hosts檔案內容,發現127.0.0.1前面有註釋:

[oracle@dbserv admin]$ more /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

#127.0.0.1 aaa1.test.com

128.129.99.49 dbserv

改為如下後,啟動監聽發現恢復正常:

[oracle@dbserv ~]$ vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

128.129.99.49 dbserv

[oracle@dbserv ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUL-2012 11:11:09

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

Starting /var/oracle/product/10.2.0/database/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production

System parameter file is /var/oracle/product/10.2.0/database/network/admin/listener.ora

Log messages written to /var/oracle/product/10.2.0/database/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserv)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv)(PORT=1521)))

STATUS of the LISTENER

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

Alias LISTENER

Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date 11-JUL-2012 11:11:10

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

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

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

Listening Endpoints Summary...

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

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

檢視監聽狀態,可以看出,已經正常了:

[oracle@dbserv ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUL-2012 11:13:23

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv)(PORT=1521)))

STATUS of the LISTENER

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

Alias LISTENER

Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date 11-JUL-2012 11:11:10

Uptime 0 days 0 hr. 2 min. 12 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

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

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

Listening Endpoints Summary...

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

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "exam" has 1 instance(s).

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

Service "examXDB" has 1 instance(s).

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

Service "exam_XPT" has 1 instance(s).

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

The command completed successfully

另外,如下檔案也值得檢視一下:

[oracle@dbserv ~]$ more /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=dbserv

[oracle@dbserv ~]$

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

相關文章