This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14321|Reply: 1

[Source] TNS-12547: TNS:lost contact解决办法

[Copy link]
Posted on 10/23/2017 2:53:52 PM | | |

Newly installed Enterprise Linux Enterprise Linux AS release 4, after installing Oracle 10gR2, the Listener cannot start.
The error message is as follows:
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 104: Connection reset by peer

[oracle@test~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 19-JUL-2007 06:46:03
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.3.0 - Production
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
Listening on: (DEscrip{filter}tION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.benbo.com)(PORT=1521)))
Listening on: (DEscrip{filtering}tION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DEscrip{filter}tION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.benbo.com)(PORT=1521)))
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 104: Connection reset by peer
Connecting to (DEscrip{filter}tION=(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
[oracle@test ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 19-JUL-2007 06:45:48
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Connecting to (DEscrip{filter}tION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.benbo.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DEscrip{filter}tION=(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
[oracle@test ~]$ ping test.benbo.com
PING test.benbo.com (192.168.109.200) 56(84) bytes of data.
64 bytes from test.benbo.com (192.168.109.200): icmp_seq=0 ttl=64 time=3.56 ms
64 bytes from test.benbo.com (192.168.109.200): icmp_seq=1 ttl=64 time=0.112 ms
64 bytes from test.benbo.com (192.168.109.200): icmp_seq=2 ttl=64 time=0.055 ms
--- test.benbo.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.055/1.245/3.569/1.643 ms, pipe 2
[oracle@test ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.109.200 test.benbo.com test
I found that there is no 127.0.0.1 localhost in /etc/hosts.

So, don't blindly delete 127.0.0.1 localhost

Modify /etc/hosts as follows
[oracle@test ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
192.168.109.200 test.hehe.com test
Restart listner, OK.
[oracle@test ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 19-JUL-2007 06:48:04
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.3.0 - Production
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
Listening on: (DEscrip{filter}tION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.benbo.com)(PORT=1521)))
Listening on: (DEscrip{filtering}tION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DEscrip{filter}tION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.benbo.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date 19-JUL-2007 06:48:06
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DEscrip{filter}tION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.benbo.com)(PORT=1521)))
(DEscrip{filter}tION=(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@test ~]$
A search on the Internet revealed another TNS-12547: TNS: lost contact situation, with the following errors:
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
The reason :listener.log the file exceeds 2G
Workaround: Empty the log file
[oracle@test ~]$ cd $ORACLE_HOME/network/log
[oracle@test log]$ cat /dev/null > listener.log




Previous:Linked to Oracle database report ORA-12547: TNS: lost contact issue
Next:ORA-28547:connection to server failed, probable Oracle Net admin error
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com