Wednesday, January 18, 2012

TNS-12541 TNS-12560 TNS-00511 Linux Error: 111

 [oracle@localhost ~]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2012 22:45:15

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> reload
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
LSNRCTL> service          
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

This problem is related with IP address. To solve, just follow the following simple steps:-

[oracle@localhost ~]$ su - root
Password:
[root@localhost ~]# vi /etc/hosts        (copy & paste the below line)


127.0.0.1       localhost.localdomain   localhost


[root@localhost ~]# su - oracle
[oracle@localhost ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2012 22:51:23

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /u01/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                18-JAN-2012 22:51:24
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

[oracle@localhost ~]$

15 comments:

  1. Thanks a lot brother it really helped me.

    ReplyDelete
  2. Thanks a lot its ok,

    ReplyDelete
  3. muchas gracias muy buena explicacion...

    ReplyDelete
  4. Hiii.......I am trying to setup dataguard, listener is not running tried the method given above but still it is giving the same error....

    Plz help

    Regards
    Leena

    ReplyDelete
  5. tanks my friend !!!!!

    ReplyDelete
  6. Thanks man, I was stuck with this for 1 hour.

    ReplyDelete
  7. Thanks Ninghthoujam..you rocks

    ReplyDelete
  8. What a magicccc mannnnnn , TY

    ReplyDelete
  9. Hey man. Thank you so muchhhhhh. you saved me

    ReplyDelete
  10. Hey man. Thank you so muchhhhhh. you saved me

    ReplyDelete
  11. This worked for me too, the content of the /etc/hosts file should be exactly

    127.0.0.1 localhost

    ReplyDelete
  12. Finally got my instance of oracle xe 11g successfully connected to sqldeveloper because of this!
    Great info!

    ReplyDelete