Friday 23 November 2012

TNS-12547: TNS:lost contact -- lsnrctl start

I successfully installed Oracle 10g on OEL4. Everything went fine except for one, I could not start the listener.

[oracle@oralinux ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 31-AUG-2009 22:10:09

Copyright (c) 1991, 2007, 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.4.0 - Production
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oralinux.seer-technologies.com)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 104: Connection reset by peer


I did some googling and came across with this OTN discussion. I learned that the error was caused by missing loopback entry in /etc/hosts file.

[root@oralinux ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
10.0.3.5 oralinux.seer-technologies.com oralinux








After adding the loopback entry in my /etc/hosts file, I was able to start the listener.

[root@oralinux ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.0.3.5 oralinux.seer-technologies.com oralinux

No comments: