Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#34334 - [apache] Install error & PID file cannot be created

Attached to Project: Arch Linux
Opened by Jeroen Op 't Eynde (Duologic) - Saturday, 16 March 2013, 13:36 GMT
Last edited by Jan de Groot (JGC) - Monday, 18 March 2013, 14:03 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
On install of apache: "error: command failed to execute correctly".
Could not start httpd after installation.
Directory /run/httpd is not created, therefore PID file cannot be created.

Additional info:

# pacman -S apache
...
(4/5) installing apache [########################################################################################] 100%
error: command failed to execute correctly
...

# systemctl start httpd
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

# journalctl -xn

-- Logs begin at Sat 2013-03-16 13:44:17 CET, end at Sat 2013-03-16 14:27:18 CET. --
Mar 16 14:27:05 lamp001 sudo[10537]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 16 14:27:05 lamp001 systemd[1]: Starting Apache Web Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/7d4958e842da4a758f6c1cdc7b36dcc5
--
-- Unit httpd.service has begun starting up.
Mar 16 14:27:05 lamp001 apachectl[10540]: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::a00:27ff:fe6b:a9ad for ServerName
Mar 16 14:27:06 lamp001 systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start.
Mar 16 14:27:07 lamp001 systemd[1]: httpd.service never wrote its PID file. Failing.
Mar 16 14:27:07 lamp001 systemd[1]: Failed to start Apache Web Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Mar 16 14:27:07 lamp001 systemd[1]: Unit httpd.service entered failed state
Mar 16 14:27:07 lamp001 sudo[10537]: pam_unix(sudo:session): session closed for user root
Mar 16 14:27:18 lamp001 sudo[10548]: lamp001 : TTY=pts/1 ; PWD=/home/lamp001 ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Mar 16 14:27:18 lamp001 sudo[10548]: pam_unix(sudo:session): session opened for user root by (uid=0)

# httpd -v
Server version: Apache/2.2.23 (Unix)
Server built: Sep 19 2012 22:40:43

Resolution:
# mkdir /run/httpd
# systemctl start httpd

Steps to reproduce:

# pacman -S apache
# systemctl start httpd
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 18 March 2013, 14:03 GMT
Reason for closing:  Fixed
Comment by tuxer (tuxer) - Saturday, 16 March 2013, 22:05 GMT
I can confirm this bug, too
Comment by tuxer (tuxer) - Saturday, 16 March 2013, 22:12 GMT

The solution is here: adding your hostname to /etc/hosts
https://bbs.archlinux.org/viewtopic.php?id=154725
Comment by Jeroen Op 't Eynde (Duologic) - Sunday, 17 March 2013, 14:26 GMT
The PID file problem is still there.

The hosts file just solves the part about "httpd: Could not reliably determine the server's fully qualified domain name..." which is not a bug.
Comment by Evangelos Foutras (foutrelis) - Sunday, 17 March 2013, 17:55 GMT
Looks like the .install file needs to call:

systemd-tmpfiles --create apache.conf

"/usr/lib/tmpfiles.d/apache.conf" appears to work too, it just doesn't like relative paths.

Loading...