Find the answer to your Linux question:
Results 1 to 7 of 7
hi all, I'm getting following error when i try to access localhost "connection was refused when attempting to contact localhost" what's this mean?what should i do ? Actually it worked ...
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Smile [SOLVED] connection was refused when attempting to contact localhost



    hi all,
    I'm getting following error when i try to access localhost
    "connection was refused when attempting to contact localhost"
    what's this mean?what should i do ?
    Actually it worked fine for a while ...then it's throws the above msg.
    my /etc/hosts file entries
    127.0.0.1 localhost.localdomain localhost
    10.232.30.25 pc012345.xyz.com pc012345
    when i run the command hostname it shows
    pc012345

    please help me out..
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  2. #2
    Linux Newbie objuan's Avatar
    Join Date
    Jul 2006
    Location
    california
    Posts
    218
    Quote Originally Posted by Lakshmipathi View Post
    hi all,
    I'm getting following error when i try to access localhost
    "connection was refused when attempting to contact localhost"
    Hi
    were did this host name come from 10.232.30.25 pc012345.xyz.com pc012345
    your hostname is referring to pc012345 as the host name

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Smile

    Quote Originally Posted by objuan View Post
    Hi
    were did this host name come from 10.232.30.25 pc012345.xyz.com pc012345
    your hostname is referring to pc012345 as the host name
    I'm working in LAN under domain name xyz.com.
    While installing spikesource ,it worked only when i added
    10.232.30.25 pc012345.xyz.com pc012345
    in /etc/hosts
    i believe the information is not sufficent for other to help....
    I'm don't have much networking knowlegde..(domain name,proxy etc..etc...)
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  4. #4
    Linux Newbie objuan's Avatar
    Join Date
    Jul 2006
    Location
    california
    Posts
    218
    Sorry I took so long to get back to you.
    All you need in the hosts file is the ipaddress and hostname besides the local host
    127.0.0.1 localhost.localdomain localhost
    10.232.30.25 pc012345

    Try this I hope it helps.

  5. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Post

    thanks....
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  6. #6
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Angry

    No ....again i'm unable to connect to localhost but i can connect to web sites like this....
    any know what's going wrong....i don't have any idea abt how 2 fix this
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  7. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    Editing /etc/hosts with correct your IP address and then make sure having
    Primary DNS server name /etc/resolv.conf along with
    setting ipaddress with default gateway

    /sbin/ifconfig eth0 192.168.1.4 netmask 255.255.255.0 up
    /sbin/route add default gw 192.168.1.1
    Solved the issue.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •