Starting httpd: httpd: apr_sockaddr_info_get() failed for
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
What Led to This
This came out of the blue. We did not implement a configuration change in apache. We only changed the root passwd in mySQL database. To do this, we had to stop the database server and momentarily run in the safe mode. And since the database server was going to be offline temporarily we judged it wise to also shutdown the web server.
After restarting the mySQL server successfully, we naturally restarted the webserver:
#/etc/init.d/httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
As you see, the server started but it complained about the fully qualified domain name not determinable.
Troubleshooting
Top shows that the server OS has been up for 106 days continuously. So no one has restarted with a changed kernel.
Then we ran hostname command to see what value the server OS had.
hostname returned blank
uname -n also returned blank
However, looking at the contents of /etc/sysconfig/network we were surprised with what we saw:
#cat /etc/sysconfig/network
HOSTNAME=u15334762.onlinehome-server.com
NETWORKING=yes
NOZEROCONF=yes
That is, there is no reason why there should be no configured hostname. A solution based on this is to just reboot the server and it will pick up the hostname in /etc/sysconfig/network and perhaps cure other ills we don't yet know about. But we decided against this nuclear option. In the UNIX/Linux production environment, one should only reboot if and only if there is no other option.
The Solution
We decided to refresh the hostname by using the Linux sysctl command:
#sysctl kernel.hostname=u15334762.onlinehome-server.com
Then, we verified that the re-setting was accepted:
#sysctl kernel.hostname
kernel.hostname = u15334762.onlinehome-server.com
Also, hostname and uname were used for confirmation:
#hostname
u15334762.onlinehome-server.com
#uname -n
u15334762.onlinehome-server.com
Finally, we restarted the web server and all was (is) well again:
#/etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Note, when you checkout "u15334762.onlinehome-server.com" the browser will take you to "http://www.paintball-gear-supplies.com/". If you're in the USA, as the store does not currently ship Internationally, you will get Great $Prices on Camping Gear, Paintball Supplies, Riflescopes and Hunting Accessories. Best overall value, when you compare prices with shipping - the total cost of the order from the warehouse to your door.
No comments:
Post a Comment