前言
我自以为对oracle的监听这一块的知识还是比较扎实的,直到这次遇到了lsnrctl start 报错,经过我初步检查之后没有发现什么可疑之处,于是我开始认识到我的知识的不足,便开始查找资料,各种关于oracle listener的文件,博客,网站的介绍。但是让我感觉奇怪的是,我找了半天的listener启动失败的博客,竟然没有一个是符合我这种条件的,于是我开始了自解之路 ,直到我真正发现了问题的所在地,我才恍然大屋--我的监听程序没有配置监听端口。
关于我的这个监听端口号的问题,我想一般情况下不会有第二个我了,在安装数据库的时候oracle报告了一些错误,当时我并没有在意,当我启动oracle listener的时候问题出现了于是有了我的一趟弯路之行。
[oracle@BaiFei]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-SEP-2012 17:33:28
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /opt/oracle/product/10.2.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /opt/oracle/product/10.2.0/network/admin/listener.ora
Log messages written to /opt/oracle/product/10.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
TNS-01150: The address of the specified listener name is incorrect
TNS-01153: Failed to process string: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pro)(PORT=null)))
Listener failed to start. See the error message(s) above...
[oracle@BaiFei$
检查监听程序的配置文件内容
[oracle@BaiFei]$ cat /opt/oracle/product/10.2.0/network/admin/listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/10.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST = (SID_DESC =(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/10.2.0)
(PROGRAM = extproc))
)
LISTENER =
(DESCRIPTION_LIST =(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = pro)(PORT = null))
)
)
[oracle@]$
检查日志文件
[oracle@BaiFei]$ cat /opt/oracle/product/10.2.0/network/log/listener.log
TNSLSNR for Linux: Version 10.2.0.1.0 - Production on 13-SEP-2012 13:42:46
Copyright (c) 1991, 2005, Oracle. All rights reserved.
System parameter file is /opt/oracle/product/10.2.0/network/admin/listener.ora
Log messages written to /opt/oracle/product/10.2.0/network/log/listener.log
Trace information written to /opt/oracle/product/10.2.0/network/trace/listener.trc
Trace level is currently 0
Started with pid=7839
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
TNS-01150: The address of the specified listener name is incorrect