Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

httpd 2.4.33 fails to start on EL 6 due to invalid PidFile location #19

Closed
Ryuzavi opened this issue Apr 18, 2018 · 5 comments
Closed

Comments

@Ryuzavi
Copy link

Ryuzavi commented Apr 18, 2018

Hey

Not completely sure if this is a repo or a direct apache issue but I noticed that httpd was failing to start today on some Centos 6 machines after the update to 2.4.33.

Turns out the PidFile setting has changed from /var/run/httpd/httpd.pid to /run/httpd/httpd.pid between 2.4.29 and 2.4.33 somehow although I can't see exactly why after quickly looking both at apache's and this source.

Nonetheless this means httpd will always fail on Centos 6 due to the /run directory not existing. It does exist on Centos 7 so I think it gets a pass there but I also wonder if it's wrong on there also despite.

Cheers,
R.

@Ryuzavi Ryuzavi changed the title httpd 2.4.33 fails to start due to invalid PidFile location for Centos 6 httpd 2.4.33 fails to start on EL 6 due to invalid PidFile location Apr 18, 2018
@carlwgeorge
Copy link
Member

I think this is related to #18, can you update to 2.4.33-2 and see if that resolves the issue?

@Ryuzavi
Copy link
Author

Ryuzavi commented Apr 18, 2018

I did try the rpm's directly as my mirrors hadn't updated and that didn't work. To make sure I spun up a docker and installed from the repo and it still fails sadly:

[root@293bb19bf914 kitchen]# sudo yum install httpd24u
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mozart.ee.ic.ac.uk
 * epel: mirrors.coreix.net
 * extras: mirror.sov.uk.goscomb.net
 * ius: mirror.ehv.weppel.nl
 * updates: mirrors.coreix.net
Resolving Dependencies
--> Running transaction check
---> Package httpd24u.x86_64 0:2.4.33-2.ius.centos6 will be installed
--> Processing Dependency: httpd24u-tools = 2.4.33-2.ius.centos6 for package: httpd24u-2.4.33-2.ius.centos6.x86_64
--> Processing Dependency: httpd24u-filesystem = 2.4.33-2.ius.centos6 for package: httpd24u-2.4.33-2.ius.centos6.x86_64
--> Processing Dependency: httpd24u-filesystem = 2.4.33-2.ius.centos6 for package: httpd24u-2.4.33-2.ius.centos6.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd24u-2.4.33-2.ius.centos6.x86_64
--> Processing Dependency: libapr15u-1.so.0()(64bit) for package: httpd24u-2.4.33-2.ius.centos6.x86_64
--> Processing Dependency: libapr15uutil-1.so.0()(64bit) for package: httpd24u-2.4.33-2.ius.centos6.x86_64
--> Processing Dependency: libnghttp2.so.14()(64bit) for package: httpd24u-2.4.33-2.ius.centos6.x86_64
--> Running transaction check
---> Package apr15u.x86_64 0:1.5.2-2.ius.centos6 will be installed
---> Package apr15u-util.x86_64 0:1.5.4-3.ius.centos6 will be installed
---> Package httpd24u-filesystem.noarch 0:2.4.33-2.ius.centos6 will be installed
---> Package httpd24u-tools.x86_64 0:2.4.33-2.ius.centos6 will be installed
---> Package libnghttp2.x86_64 0:1.6.0-1.el6.1 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved
==============================================================================================================================================================================================================================================

 Package                                                         Arch                                               Version                                                            Repository                                        Size ==============================================================================================================================================================================================================================================
Installing:
 httpd24u                                                        x86_64                                             2.4.33-2.ius.centos6                                               ius                                              1.3 M Installing for dependencies:
 apr15u                                                          x86_64                                             1.5.2-2.ius.centos6                                                ius                                              105 k  apr15u-util                                                     x86_64                                             1.5.4-3.ius.centos6                                                ius                                               88 k  httpd24u-filesystem                                             noarch                                             2.4.33-2.ius.centos6                                               ius                                               25 k  httpd24u-tools                                                  x86_64                                             2.4.33-2.ius.centos6                                               ius                                               82 k  libnghttp2                                                      x86_64                                             1.6.0-1.el6.1                                                      epel                                              56 k  mailcap                                                         noarch                                             2.1.31-2.el6                                                       base                                              27 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install       7 Package(s)

Total download size: 1.6 M
Installed size: 4.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): apr15u-1.5.2-2.ius.centos6.x86_64.rpm                                                                                                                                                                           | 105 kB     00:00
(2/7): apr15u-util-1.5.4-3.ius.centos6.x86_64.rpm                                                                                                                                                                      |  88 kB     00:00
(3/7): httpd24u-2.4.33-2.ius.centos6.x86_64.rpm                                                                                                                                                                        | 1.3 MB     00:00
(4/7): httpd24u-filesystem-2.4.33-2.ius.centos6.noarch.rpm                                                                                                                                                             |  25 kB     00:00
(5/7): httpd24u-tools-2.4.33-2.ius.centos6.x86_64.rpm                                                                                                                                                                  |  82 kB     00:00
(6/7): libnghttp2-1.6.0-1.el6.1.x86_64.rpm                                                                                                                                                                             |  56 kB     00:00
(7/7): mailcap-2.1.31-2.el6.noarch.rpm                                                                                                                                                                                 |  27 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         2.3 MB/s | 1.6 MB     00:00

warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) <epel@fedoraproject.org>
 Package: epel-release-6-8.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Importing GPG key 0x9CD4953F:
 Userid : IUS Community Project <coredev@iuscommunity.org>
 Package: ius-release-1.0-15.ius.centos6.noarch (installed)
 From   : /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : apr15u-1.5.2-2.ius.centos6.x86_64                                                                                                                                                                                          1/7
  Installing : apr15u-util-1.5.4-3.ius.centos6.x86_64                                                                                                                                                                                     2/7
  Installing : httpd24u-tools-2.4.33-2.ius.centos6.x86_64                                                                                                                                                                                 3/7
  Installing : mailcap-2.1.31-2.el6.noarch                                                                                                                                                                                                4/7
  Installing : httpd24u-filesystem-2.4.33-2.ius.centos6.noarch                                                                                                                                                                            5/7
  Installing : libnghttp2-1.6.0-1.el6.1.x86_64                                                                                                                                                                                            6/7
  Installing : httpd24u-2.4.33-2.ius.centos6.x86_64                                                                                                                                                                                       7/7
  Verifying  : libnghttp2-1.6.0-1.el6.1.x86_64                                                                                                                                                                                            1/7
  Verifying  : httpd24u-filesystem-2.4.33-2.ius.centos6.noarch                                                                                                                                                                            2/7
  Verifying  : httpd24u-2.4.33-2.ius.centos6.x86_64                                                                                                                                                                                       3/7
  Verifying  : apr15u-util-1.5.4-3.ius.centos6.x86_64                                                                                                                                                                                     4/7
  Verifying  : httpd24u-tools-2.4.33-2.ius.centos6.x86_64                                                                                                                                                                                 5/7
  Verifying  : mailcap-2.1.31-2.el6.noarch                                                                                                                                                                                                6/7
  Verifying  : apr15u-1.5.2-2.ius.centos6.x86_64                                                                                                                                                                                          7/7

Installed:
  httpd24u.x86_64 0:2.4.33-2.ius.centos6

Dependency Installed:
  apr15u.x86_64 0:1.5.2-2.ius.centos6 apr15u-util.x86_64 0:1.5.4-3.ius.centos6 httpd24u-filesystem.noarch 0:2.4.33-2.ius.centos6 httpd24u-tools.x86_64 0:2.4.33-2.ius.centos6 libnghttp2.x86_64 0:1.6.0-1.el6.1 mailcap.noarch 0:2.1.31-2.el6

[root@293bb19bf914 kitchen]# httpd -t -D DUMP_RUN_CFG
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex cache-socache: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

[root@293bb19bf914 kitchen]# sudo service httpd start
Starting httpd: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
                                                           [  OK  ]
[root@293bb19bf914 kitchen]# sudo service httpd status
#httpd dead but subsys locked

Even though it shows ok when it start command is issue it's actually still failing as the pid is not created in the non existent directory and it's not actually started.

@TrapoSAMA
Copy link

Hi,

2.4.33-2 fix that issue. I check with both centos6 and centos7

:)

@carlwgeorge
Copy link
Member

Tracked down the issue, it's not related to my goof up in #18. Fedora and RHEL have traditionally added in the filesystem layout via patch. The runtimedir in the layout differs slightly between Fedora/RHEL7 and RHEL6, /run/httpd versus /var/run/httpd. IUS has carried separate patches for each of those layouts and applied them conditionally. Upstream added the Fedora layout in 2.4.33. Our patches still apply, but the layout added by the patch was after the upstream layout, and thus the legacy tweak to set runtimedir to /var/run/httpd wasn't taking effect.

Working on fixing this now, thanks for opening the issue!

@nicjansma
Copy link

Just hit this issue as well, thanks for looking in @carlwgeorge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants