Bug 1329639 - error in service httpd24-httpd configtest
Summary: error in service httpd24-httpd configtest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: httpd
Version: httpd24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 2.4
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 1471044
TreeView+ depends on / blocked
 
Reported: 2016-04-22 12:32 UTC by Ondřej Pták
Modified: 2020-08-13 08:27 UTC (History)
8 users (show)

Fixed In Version: httpd-2.4.25-6.el7
Doc Type: Bug Fix
Doc Text:
A former Known Issue: On Red Hat Enterprise Linux 7, running the "service httpd24-httpd configtest" command fails with an error message. To work around this problem, run the following command: scl enable httpd24 'apachectl configtest'
Clone Of:
: 1471044 (view as bug list)
Environment:
Last Closed: 2017-04-26 10:21:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1161 0 normal SHIPPED_LIVE Moderate: httpd24-httpd security, bug fix, and enhancement update 2017-04-26 14:19:21 UTC

Description Ondřej Pták 2016-04-22 12:32:08 UTC
Description of problem:
Running service httpd24-httpd configtest results in error on rhel-7.
On rhel-6, this is not a problem. On rhel-7, this command also has no problem:
scl enable httpd24 'apachectl configtest'
This use case worked in version httpd24-httpd-2.4.12-6.el7.1.x86_64

Version-Release number of selected component (if applicable):
httpd24-httpd-2.4.18-10.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. service httpd24-httpd configtest

Actual results:
httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

Expected results:
Syntax OK

Additional info:
httpd24-httpd service can start and work

Comment 1 Joe Orton 2016-04-26 16:26:06 UTC
Nice catch.  The systemd legacy actions need to invoke apachectl via scl enable too.

Comment 6 Jan Houska 2017-03-14 10:13:08 UTC
Verified:

Old FAIL
version :
httpd24-httpd-2.4.18-10.el7.x86_64

# service httpd24-httpd configtest
httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

New pass: 
version:
httpd24-httpd-2.4.25-8.el7.x86_64

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: service actions
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'service httpd24-httpd configtest'
Syntax OK
:: [   PASS   ] :: Command 'service httpd24-httpd configtest' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'service httpd24-httpd start'
Redirecting to /bin/systemctl start  httpd24-httpd.service
:: [   PASS   ] :: Command 'service httpd24-httpd start' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'service httpd24-httpd graceful'
:: [   PASS   ] :: Command 'service httpd24-httpd graceful' (Expected 0, got 0)
'f3b5d50d-a9b7-41f6-a50a-2237ab0763cd'
service-actions result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-52511813/journal.txt
    Info: Searching AVC errors produced since 1488571051.53 (Fri Mar  3 14:57:31 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.hObJde
:
   AvcLog: /mnt/testarea/tmp.hObJde

Comment 8 errata-xmlrpc 2017-04-26 10:21:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1161

Comment 9 Robert Brockway 2017-10-30 01:16:03 UTC
This appears to still be present in: httpd24-httpd-2.4.27-8.el7.x86_64

# rpm -qa | grep httpd24-httpd
httpd24-httpd-tools-2.4.27-8.el7.x86_64
httpd24-httpd-2.4.27-8.el7.x86_64

# /opt/rh/httpd24/root/usr/sbin/apachectl configtest
httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

# ps aux | grep http
root      67198  0.0  0.0 112660   972 pts/1    S+   11:03   0:00 grep --color=auto http

# /opt/rh/httpd24/root/usr/sbin/apachectl start

# ps aux | grep http
root      67207  5.0  0.2 269928  7964 ?        Ss   11:03   0:00 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
apache    67208  0.0  0.1 310908  4368 ?        Sl   11:03   0:00 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
apache    67209  0.0  0.1 310908  4368 ?        Sl   11:03   0:00 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
apache    67210  0.0  0.1 507580  6432 ?        Sl   11:03   0:00 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
apache    67211  0.0  0.1 310908  4368 ?        Sl   11:03   0:00 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
apache    67212  0.0  0.1 310908  4368 ?        Sl   11:03   0:00 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND
root      67255  0.0  0.0 112660   972 pts/1    S+   11:04   0:00 grep --color=auto http

Comment 10 Luboš Uhliarik 2017-10-30 14:55:14 UTC
# rpm -qa |grep httpd24-httpd
httpd24-httpd-2.4.27-8.el7.x86_64


# scl enable httpd24 -- /opt/rh/httpd24/root/usr/sbin/apachectl configtest
Syntax OK

OR

# service httpd24-httpd configtest
Syntax OK

Comment 11 Parth 2020-08-06 13:33:28 UTC
#friskpkg@friskd04:sbin$ rpm -qa |grep httpd24-httpd
httpd24-httpd-2.4.34-15.el7.x86_64

#friskpkg@friskd04:sbin$ scl enable httpd24 -- /opt/rh/httpd24/root/usr/sbin/apachectl configtest
Syntax OK

#friskpkg@friskd04:sbin$ /opt/rh/httpd24/root/usr/sbin/apachectl configtest
httpd: Syntax error on line 58 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

Still error remains

Comment 12 Joe Orton 2020-08-06 14:50:31 UTC
Use either supported command described in comment 10.  Running "apachectl" outside of "scl enable httpd24" is not supported.


Note You need to log in before you can comment on or make changes to this bug.