操作系统:Red Hat Enterprise Linux Server release 5.2 (Tikanga)
oracle数据库:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
本机上sqlplus "/as sysdba"是可以进入数据库的,在启动监听器时出现如下情况:
[oracle@btasetl log]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 13-10ÔÂ-2009 09:52:59
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNS-12537: TNS:connection closed
TNS-12560: TNSrotocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
上网上找了一下,说是有可能是/etc/hosts文件的问题,我按照方法试了后还是不行
$ORACLE_HOME/network/log/listener.log文件内容如下:
TNSLSNR for Linux: Version 10.2.0.1.0 - Production on 13-10ÔÂ-2009 09:45:22
Copyright (c) 1991, 2005, Oracle. All rights reserved.
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Trace information written to /u01/app/oracle/product/10.2.0/db_1/network/trace/listener.trc
Trace level is currently 0
Started with pid=22993
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=btasetl)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
其中/u01/app/oracle/product/10.2.0/db_1/network/trace/listener.trc这个文件没有
/u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora的内容为:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = btasetl)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
/etc/hosts文件的内容为:
::1 localhost.localdomain localhost
10.1.71.152 btasetl
后来把hosts中的内容变为
127.0.0.1 btasetl localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
就可以了,原来::1是IPV6地址,不能配localhost
而IPV4本地回环地址才可以配localhost
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7490392/viewspace-1027804/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7490392/viewspace-1027804/