Showing posts with label apr_sockaddr_info_get() failed. Show all posts
Showing posts with label apr_sockaddr_info_get() failed. Show all posts

Friday, March 15, 2013

Apache Startup Failures and Hostname Resolution

Upon restarting Apache, you may receive errors like this:

# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: apr_sockaddr_info_get() failed for webserver-sb-1
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

In order to resolve this issue and successfully start Apache, you will need to ensure that there is a resolvable hostname assigned to your server. This hostname does not need to be a fully qualified domain name (FQDN), it just needs to resolve. Here is how to get around it. 

#echo yourhostname.extension > /etc/hostname
#/bin/hostname -F /etc/hostname

Finally, confirm that the assigned domain name is resolvable using the host command

#host yourhostname.extension localhost

If not, check the following settings:

-does /etc/resolv.conf have the correct DNS servers listed to allow for resolution?
-If your hostname is not an FQDN, list the hostname in /etc/hosts

RAT Bastard

Earlier this week, several servers I maintain were targeted by automated attempts to upload a remote access trojan (RAT). The RAT is a simpl...