Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = *****)(PORT = 1521))) (CONNECT_DATA = (SID = smsnew)))
TNS-12541: TNS:no listener
[oracle@localhost ~]$ lsnrctl status
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=EXTPROC)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
启动listener 看看:
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
没办法了,baidu一下吧。简索Linux Error: 32: Broken pipe 找到原因,原来是listener.log超出2G了,以前只是听说过这个错误,没想到竟然被碰上了,晕。
/data/oracle/product/9.2.0/network/log
[oracle@localhost log]$ du -sh *
4.0K dbsnmp.nohup
4.0K listenerdb.log
2.1G listener.log
4.0K sqlnet.log
4.0K start.log
4.0K status.log
4.0K stop.log
0 z
[oracle@localhost log]$ mv listener.log listener.log.bak
[oracle@localhost log]$ cat /dev/null > listener.log
[oracle@localhost log]$ ls -l
total 2099228
-rw-r--r-- 1 oracle oinstall 813 Mar 1 2006 dbsnmp.nohup
-rw-r--r-- 1 oracle oinstall 1880 Sep 22 10:34 listenerdb.log
-rw-r--r-- 1 oracle oinstall 0 Nov 26 07:09 listener.log
-rw-r--r-- 1 oracle oinstall 2147483647 Nov 26 04:27 listener.log.bak
-rw-r--r-- 1 oracle oinstall 3098 Nov 26 06:55 sqlnet.log
-rw-r--r-- 1 oracle oinstall 484 Aug 20 10:29 start.log
-rw-r--r-- 1 oracle oinstall 976 Mar 1 2006 status.log
-rw-r--r-- 1 oracle oinstall 1927 Aug 20 10:29 stop.log
-rw-r--r-- 1 oracle oinstall 0 Feb 18 2004 z
再次重起listener。
[oracle@localhost ~]$ lsnrctl
LSNRCTL for Linux: Version 9.2.0.7.0 - Production on 26-NOV-2006 07:10:10
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(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=EXTPROC)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
LSNRCTL> start
Starting /data/oracle/product/9.2.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.7.0 - Production
System parameter file is /data/oracle/product/9.2.0/network/admin/listener.ora
Log messages written to /data/oracle/product/9.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.7.0 - Production
Start Date 26-NOV-2006 07:10:16
Uptime 0 days 0 hr. 0 min. 6 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /data/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File /data/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "**" has 1 instance(s).
Instance "**", status UNKNOWN, has 1 handler(s) for this service...
Service "**" has 1 instance(s).
Instance "**", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ****)(PORT = 1521))) (CONNECT_DATA = (SID = smsnew)))
OK (0 msec)
说明可以连接上。
至此,此问题解决。
mv listener.log listener `date +%F`.log.bak
[oracle@localhost log]$ ls -l ~/clear_listenerlog.sh
-rw xr- xr- x 1 oracle oinstall 88 Nov 27 15:07 /home/oracle/clear_listenerlog.sh
[oracle@localhost log]$ crontab -l
# (/tmp/crontab.8411 installed on Fri Mar 3 13:01:58 2006)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
#00 02 * * * sh /app/shell/oraclesh/logic_bak.sh
00 01 1 * * /home/oracle/clear_listenerlog.sh
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24032200/viewspace-672797/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24032200/viewspace-672797/