How to Fix AH00558 and AH00557 httpd apr_sockaddr_info_get() Error Message

When you are starting Apache server, you might get the AH00557 and AH00558 warning message as shown below.

# /usr/local/apache2/bin/apachectl start
AH00557: httpd: apr_sockaddr_info_get() failed for dev-server
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Apache/2.4.2 mod_ssl (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.
Server www.example.com:443 (RSA)
Enter pass phrase:
OK: Pass Phrase Dialog successful.

You’ll also get the same warning message even when you stop the Apache HTTPD server as shown below.

# /usr/local/apache2/bin/apachectl stop
AH00557: httpd: apr_sockaddr_info_get() failed for dev-server
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

If you are using service httpd to stop and start, you ‘ll get the similar warning message.

# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for dev-server
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

To fix the above warning message, add the “ServerName” directive to the httpd.conf file accordingly.

# vi /usr/local/apache2/conf/httpd.conf
ServerName 192.168.1.2

Note: Depending on how your are planning to setup the Apache, the above ServerName directive can either be a hostname, or ip-address, or fully qualified domain name. If you are just running the Apache for internal testing purpose, you can simply set it to the ip-address of the server.

If you want to use hostname in the httpd.conf file, make sure you also have a corresponding entry in the /etc/hosts file for that hostname as shown below.

# vi /usr/local/apache2/conf/httpd.conf
ServerName dev-server

# vi /etc/hosts
127.0.0.1   dev-server localhost.localdomain localhost

Now when you start the apache again, you’ll not get the warning message anymore.

# service httpd stop
Stopping httpd:    [  OK  ]

Comments on this entry are closed.

  • Shadaksharayya April 4, 2014, 2:03 am

    Re-install mod_ssl rpm and restart httpd to overcome below issue.

    Starting httpd: httpd: apr_sockaddr_info_get() failed for dev-server