Linux Error 111: Connection refused

When attempting to start the listener you get an error like the one below.

[oracle@wrath trace]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 30-APR-2010 10:42:24

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

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/wrath/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wrath.ehjconsultancy.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12547: TNS:lost contact
 TNS-12560: TNS:protocol adapter error
  TNS-00517: Lost contact
   Linux Error: 104: Connection reset by peer
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=wrath.ehjconsultancy.com)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@wrath trace]$ 

Problem:

The hosts file does not contain the correct address or name for the server. This can also occur if the loopback address is not present. Edit /etc/hosts and verify that the host name and address are correct. Also verify that 127.0.0.1 localhost.localdoman localhost are present.

Save the changes and restart the listener.

[oracle@wrath trace]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 30-APR-2010 10:55:27

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

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/wrath/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wrath.ehjconsultancy.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-APR-2010 10:55:29
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/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/wrath/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wrath.ehjconsultancy.com)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@wrath trace]$ 

21 thoughts on “Linux Error 111: Connection refused”

  1. hi,

    It really worked. thanks a lot.

    But can you tell me how the loop back entry in /etc/hosts relates to listener ?

    Thanks again.

  2. Hi Guys

    Really Itz good solution, it was worked and given results at the time of botttle neck.

    Cheers
    Sudhakar

  3. After some googling I came accross this post. It helped me. For me the problem was the server on which the Oracle DB was installed was a VM and it was moved. So, had to change the ip address mention in the hosts file and it started working.
    Thanks for the inputs.

  4. Your suggestion to put in the lines in the /etc/host file:

    127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

    fixed the problem! Thanks!

  5. This worked like a charm !!

    Had i not read your post, it were going to be a huge challenge for me getting a workaround to this problem. I’ve spent a whole day trying to resolve this silly little issue – almost done every revamp possible but couldn’t overcome this problem. A big thanks to you, would you be able to shed some light as to why would we require uncommenting the loopback ? What kind of significance does it actually play ?

    Thank you again.

  6. I have noticed you don’t monetize your website, don’t waste your
    traffic, you can earn extra bucks every month because you’ve got hi quality content.
    If you want to know how to make extra $$$, search for: Ercannou’s essential tools best
    adsense alternative

  7. I often visit your site and have noticed that you don’t update it often. More frequent updates will give
    your site higher authority & rank in google. I know that writing content takes a lot of time, but you can always help yourself
    with miftolo’s tools which will shorten the time of creating an article to a couple of seconds.

Leave a Reply

Your email address will not be published. Required fields are marked *