Bug 1329639

Summary: error in service httpd24-httpd configtest
Product: Red Hat Software Collections Reporter: Ondřej Pták <optak>
Component: httpdAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: httpd24CC: jhouska, jon.dufresne, jorton, kanderso, lkuprova, parth.v.thakkar, pragshar, rbrockway
Target Milestone: beta   
Target Release: 2.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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'
Story Points: ---
Clone Of:
: 1471044 (view as bug list) Environment:
Last Closed: 2017-04-26 10:21:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1471044    

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.