I have Raspberry Pi B+ with Arch Linux installed and at boot time, apache web server does not start:[xxx@rpi ~]# systemctl status -l httpd* httpd.service - Apache Web Server   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)   Active: failed (Result: exit-code) since Thu 1970-01-01 01:00:23 CET; 45 years 0 months ago  Process: 177 ExecStart=/usr/bin/apachectl start (code=exited, status=134)Jan 01 01:00:23 rpi apachectl[177]: Assertion 'canonical' failed at src/nss-myhostname/nss-myhostname.c:204, function fill_in_hostent(). Aborting.Jan 01 01:00:23 rpi apachectl[177]: /usr/bin/apachectl: line 79:   185 Aborted                 (core dumped) $HTTPD -k $ARGVJan 01 01:00:23 rpi systemd[1]: httpd.service: control process exited, code=exited status=134Jan 01 01:00:23 rpi systemd[1]: Failed to start Apache Web Server.Jan 01 01:00:23 rpi systemd[1]: Unit httpd.service entered failed state.Jan 01 01:00:23 rpi systemd[1]: httpd.service failed.Jan 01 01:00:24 rpi systemd-coredump[208]: Process 185 (httpd) of user 0 dumped core.[xxx@rpi ~]#However, if restart apache from ssh terminal (after system restart and ssh login), the apache is ran properly:[xxx@rpi ~]# systemctl restart httpd && systemctl status -l httpd* httpd.service - Apache Web Server   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)   Active: active (running) since Mon 2015-01-05 02:48:46 CET; 336ms ago  Process: 420 ExecStart=/usr/bin/apachectl start (code=exited, status=0/SUCCESS) Main PID: 424 (httpd)   CGroup: /system.slice/httpd.service           |-424 /usr/bin/httpd -k start           |-426 /usr/bin/httpd -k start           |-427 /usr/bin/httpd -k start           |-428 /usr/bin/httpd -k start           |-429 /usr/bin/httpd -k start           `-430 /usr/bin/httpd -k startJan 05 02:48:44 rpi apachectl[420]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.0.154. Set the 'ServerName' directive globally to suppress this messageJan 05 02:48:45 rpi systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start.Jan 05 02:48:46 rpi systemd[1]: Started Apache Web Server.[xxx@rpi ~]#What is going on (running Linux octopustest 3.12.35-1-ARCH #1 PREEMPT Tue Dec 23 07:14:51 MST 2014 armv6l GNU/Linux kernel and Apache/2.4.10)?
arch linux apache start at boot crash
configuration;arch linux
There's a pretty simple fix to this that worked for me. It requires editing the /etc/hosts file, which is always to be avoided if possible, but it fixed all problems that I have. This error will occur if anything tries to access the internet and get back information, including Apache, Eclipse, and other applications. This sometimes is caused by a bug in the applications themselves, but could also be a local problem, which is caused when your /etc/hosts file is missing some element that the program requires.Note that you will need admin access (or to be a part of the sudoers group) to complete some of these steps.First, open the hosts file using the following command: sudo nano /etc/hosts. Your hosts file should resemble the following, which is a direct copy of mine:# # /etc/hosts: static lookup table for host names##<ip-address>   <hostname.domain.org>   <hostname>127.0.0.1   localhost.localdomain   localhost BEN-PC-ARCH::1         localhost.localdomain   localhost BEN-PC-ARCH# End of fileNote that in addition to the reflection of 127.0.0.1 to localhost.localdomain, there is a second line that does the same. Adding this to the /etc/hosts file fixes the problem, for whatever reason.