Betriebssystem
Red Hat Enterprise Linux Server Version 7.0 (Maipo)
Beschreibung
Der Fehler:
httpd: apr_sockaddr_info_get() failed for rhel7
Erscheint beim Starten des Apache-Webserver-Daemons httpd . Es kann gesehen werden, wenn der Befehl httpd service status ausgeführt wird:
# service httpd status
Redirecting to /bin/systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: active (running) since Thu 2014-09-04 17:28:52 WST; 1min 25s ago
Main PID: 2303 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─2303 /usr/sbin/httpd -DFOREGROUND
├─2304 /usr/sbin/httpd -DFOREGROUND
├─2305 /usr/sbin/httpd -DFOREGROUND
├─2306 /usr/sbin/httpd -DFOREGROUND
├─2307 /usr/sbin/httpd -DFOREGROUND
└─2308 /usr/sbin/httpd -DFOREGROUND
Sep 04 17:28:32 rhel7 systemd[1]: Starting The Apache HTTP Server...
Sep 04 17:28:47 rhel7 httpd[2303]: AH00557: httpd: apr_sockaddr_info_get() failed for rhel7
Lösung:
In diesem Fall ist rhel7 der eigentliche Hostname für dieses System. So beheben Sie die obige Fehlermeldung:
# echo 'ServerName 127.0.0.1' >> /etc/httpd/conf/httpd.conf
und starten Sie Ihren Apache-Webserver-Daemon httpd neu, um die Änderungen zu übernehmen:
# service httpd restart