Admins eHow SysAdmin Tips & Tricks

March 28, 2011

How to fix “Starting httpd: httpd: apr_sockaddr_info_get() failed”

Filed under: Apache,General,linux — Tags: , — admin @ 5:49 am

This error is caused by the improper configuration of hostname of server. to fix it follow the steps below :
Change to your own hostname.

echo > /etc/hostname
/bin/hostname -F /etc/hostname
/etc/init.d/httpd restart
  • Guest

    Didn’t work

  • Vivek

    It worked for me. Thanks for sharing

  • Pankaj

    worked for me too

  • Sushant

    IT is really working stuff….!!!


  • Sorry, didnt work here

  • type “hostname” and you’ll get the name of your host, like “”. If you want to change the hostname to something else, just type “hostname”. Then edit /etc/hosts and set the name of your hostname on the same line as your localhost references. That will do the trick as well, the sample above does pretty much the same thing.

    Thanks for sharing.

  • Alon

    Worked for me 2. Thank you 🙂

  • seofreelance

    Look again at your ab command …
    For me, I just put 2 ww instead of three ….

  • artuc

    not working for me either….

  • vishal

    its in Centos
    # echo server-ip hostname >> /etc/hosts

    lets try

  • Brian

    I had to add the FQDN to the /etc/hosts file for it stop giving me that error, as the domain was not a real domain that resolved back to the server … might help others

  • Thx, It works

  • John Doe

    Awesome!!! Works like a charm! Thanks!

  • Daniel

    Thank you very much for great support

  • Daniel

    # vi /etc/hosts put your IP and domain entry y3infra-test

  • Floyd

    what was the command you entered

  • eRock

    I know this is an old thread but before filling up your /etc/hosts or /etc/hostname file with excess info you need to make certain that the network service is started and that one of your interfaces is enabled. “ifup interfacename”


    yep did NOTHING

Powered by WordPress