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
Nice catch. The systemd legacy actions need to invoke apachectl via scl enable too.
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
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
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
# 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
#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
Use either supported command described in comment 10. Running "apachectl" outside of "scl enable httpd24" is not supported.