Fedora Update Breaks httpd
-
After restarting httpd run this command:
journalctl -xe
for more info.You can also try tempoary setting SELinux to permissive for troubleshooting.
setenforce 0
-
Your logs not being readable is the problem.
That FQDN error is normal if you use a vhost conf file instead of editing the main httpd.conf
-
My Fedora 27 based system if fully up to date with SElinux enforcing.
[root@bookstack ~]# dnf -y update --refresh Last metadata expiration check: 0:00:00 ago on Mon 05 Mar 2018 12:16:46 PM CST. Dependencies resolved. Nothing to do. Complete! [root@bookstack ~]# getenforce Enforcing [root@bookstack ~]#
-
And you can note here, I get the same FQDN message.
[root@bookstack ~]# journalctl -u httpd.service -f -- Logs begin at Sun 2018-02-11 22:18:27 CST. -- Feb 19 17:46:24 bookstack systemd[1]: Stopping The Apache HTTP Server... Feb 19 17:46:25 bookstack systemd[1]: Stopped The Apache HTTP Server. Feb 19 17:46:25 bookstack systemd[1]: Starting The Apache HTTP Server... Feb 19 17:46:27 bookstack httpd[5272]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::243d:4b41:ab2c:c2b8. Set the 'ServerName' directive globally to suppress this message Feb 19 17:46:27 bookstack systemd[1]: Started The Apache HTTP Server. Feb 19 19:21:06 bookstack systemd[1]: Stopping The Apache HTTP Server... Feb 19 19:21:07 bookstack systemd[1]: Stopped The Apache HTTP Server. -- Reboot -- Feb 19 19:21:31 bookstack systemd[1]: Starting The Apache HTTP Server... Feb 19 19:21:32 bookstack httpd[641]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message Feb 19 19:21:32 bookstack systemd[1]: Started The Apache HTTP Server.
-
Ah, now I have the problem. I just rebooted.
So the problem is not that it updated. It is that it updated and something else changed that was not applied until a reboot applied the update. Like the new kernel.
[root@bookstack ~]# journalctl -u httpd.service -f -- Logs begin at Sun 2018-02-11 22:18:27 CST. -- Feb 19 19:21:32 bookstack httpd[641]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message Feb 19 19:21:32 bookstack systemd[1]: Started The Apache HTTP Server. Mar 05 12:18:55 bookstack systemd[1]: Stopping The Apache HTTP Server... Mar 05 12:19:02 bookstack systemd[1]: Stopped The Apache HTTP Server. -- Reboot -- Mar 05 12:19:29 bookstack systemd[1]: Starting The Apache HTTP Server... Mar 05 12:19:31 bookstack httpd[623]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Mar 05 12:19:31 bookstack systemd[1]: Failed to start The Apache HTTP Server. Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Unit entered failed state. Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Failed with result 'exit-code'.
-
@jaredbusch said in Fedora Update Breaks httpd:
Ah, now I have the problem. I just rebooted.
So the problem is not that it updated. It is that it updated and something else changed that was not applied until a reboot applied the update. Like the new kernel.
[root@bookstack ~]# journalctl -u httpd.service -f -- Logs begin at Sun 2018-02-11 22:18:27 CST. -- Feb 19 19:21:32 bookstack httpd[641]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message Feb 19 19:21:32 bookstack systemd[1]: Started The Apache HTTP Server. Mar 05 12:18:55 bookstack systemd[1]: Stopping The Apache HTTP Server... Mar 05 12:19:02 bookstack systemd[1]: Stopped The Apache HTTP Server. -- Reboot -- Mar 05 12:19:29 bookstack systemd[1]: Starting The Apache HTTP Server... Mar 05 12:19:31 bookstack httpd[623]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Mar 05 12:19:31 bookstack systemd[1]: Failed to start The Apache HTTP Server. Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Unit entered failed state. Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Failed with result 'exit-code'.
Well, bollocks. Thanks for the warning guys.
-
@jaredbusch What kernel?
-
@tim_g said in Fedora Update Breaks httpd:
@jaredbusch What kernel?
I didn't say the kernel broke anything. I said a new change that was not applied until reboot like the new kernel.
-
@jaredbusch said in Fedora Update Breaks httpd:
@tim_g said in Fedora Update Breaks httpd:
@jaredbusch What kernel?
I didn't say the kernel broke anything. I said a new change that was not applied until reboot like the new kernel.
Ah I see.
I just rebooted some web servers last night and no issues.
-
And here is the problem. SELinux on the log file.
-- Unit httpd.service has begun starting up. Mar 05 12:23:57 bookstack httpd[1046]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, usin Mar 05 12:23:57 bookstack audit[1046]: AVC avc: denied { open } for pid=1046 comm="httpd" path="/var/log/access.log" dev="dm-0" Mar 05 12:23:57 bookstack systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Mar 05 12:23:57 bookstack systemd[1]: Failed to start The Apache HTTP Server.
That vhost file that we made,
bookstack.conf
specified this:CustomLog /var/log/access.log combined
And the SELinux context is not writable by Apache.
[root@bookstack ~]# ls -laZ /var/log/access.log /var/log/httpd -rw-r--r--. 1 root root system_u:object_r:var_log_t:s0 789033 Mar 5 09:51 /var/log/access.log /var/log/httpd: total 12 drwx------. 2 root root system_u:object_r:httpd_log_t:s0 68 Feb 19 17:46 . drwxr-xr-x. 11 root root system_u:object_r:var_log_t:s0 4096 Mar 5 12:19 .. -rw-r--r--. 1 root root system_u:object_r:httpd_log_t:s0 0 Feb 19 17:37 access_log -rw-r--r--. 1 root root system_u:object_r:httpd_log_t:s0 339 Mar 5 12:23 bookstack.error.log -rw-r--r--. 1 root root system_u:object_r:httpd_log_t:s0 3536 Mar 5 12:23 error_log
It should have stated
CustomLog /var/log/httpd/access_log combined
-
So, if you followed the original instructions, you can use this to fix it.
sed -i "s/access\.log/httpd\/access_log/" /etc/httpd/conf.d/bookstack.conf
Then start apache.
systemctl start httpd
-
FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.
Not sure WTF changed to let it work then not work though.
https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30 -
@jaredbusch said in Fedora Update Breaks httpd:
FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.
Not sure WTF changed to let it work then not work though.
https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30My mistake. I've edited my post.
-
@black3dynamite said in Fedora Update Breaks httpd:
@jaredbusch said in Fedora Update Breaks httpd:
FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.
Not sure WTF changed to let it work then not work though.
https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30My mistake. I've edited my post.
Oh you're fine. Just giving you shit.
-
@jaredbusch said in Fedora Update Breaks httpd:
@black3dynamite said in Fedora Update Breaks httpd:
@jaredbusch said in Fedora Update Breaks httpd:
FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.
Not sure WTF changed to let it work then not work though.
https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30My mistake. I've edited my post.
Oh you're fine. Just giving you shit.
It just sucks that I didn't even notice the incorrect path.
-
@jaredbusch said in Fedora Update Breaks httpd:
So, if you followed the original instructions, you can use this to fix it.
sed -i "s/access\.log/httpd\/access_log/" /etc/httpd/conf.d/bookstack.conf
Then start apache.
systemctl start httpd
As always, thanks @JaredBusch that fixed it for me as well.
-
This post is deleted!