Bug 1566511 - Apache reverse proxy and NSS not working
Summary: Apache reverse proxy and NSS not working
Alias: None
Product: Fedora
Classification: Fedora
Component: httpd
Version: 27
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Luboš Uhliarik
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-12 12:45 UTC by bitjunks
Modified: 2018-11-30 21:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-11-30 21:29:51 UTC
Type: Bug

Attachments (Terms of Use)
Proposed update to httpd-2.4.18-sslmultiproxy.patch (5.10 KB, patch)
2018-04-13 15:19 UTC, Rob Crittenden
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1564537 0 unspecified CLOSED httpd-2.4.33-2 won't start with SSL certificate error 2021-02-22 00:41:40 UTC

Description bitjunks 2018-04-12 12:45:23 UTC
Description of problem:
After upgrading from httpd-2.4.29-1.fc27.x86_64 to latest httpd-2.4.33-2.fc27.x86_64

reverse proxy has stopped working and I get error logs

[Wed Apr 11 23:20:23.596423 2018] [core:notice] [pid 7:tid 140093022845184] AH00094: Command line: 'httpd -d /etc/httpd/ -e info -D FOREGROUND'
[Wed Apr 11 23:20:28.215140 2018] [proxy:error] [pid 12:tid 140092236625664] AH00961: HTTPS: failed to enable ssl support for (dogtag-10-5-6.dogtag-nw)
[Wed Apr 11 23:20:28.546692 2018] [proxy:error] [pid 12:tid 140092323849984] AH00961: HTTPS: failed to enable ssl support for (dogtag-10-5-6.dogtag-nw)

virtual host configuration:
<VirtualHost *:443>
        ServerName dogtag2.bit.space
        NSSEngine on
        <Proxy *>
                Require all granted
        NSSProxyEngine on
        NSSNickname dogtag2.bit.space
        <Location / >
                ProxyPass         https://dogtag-10-5-6.dogtag-nw:8443/
                ProxyPassReverse  https://dogtag-10-5-6.dogtag-nw:8443/

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install version 2.4.29
2. Install mod_nss
3. Create and save certificate/key in nssdb
4. Configure reverse proxy
5. Test to see that everything works
6. Upgrade to 2.4.33
7. Boom. No reverse proxy and error messages in log.

Actual results:
Non-Working reverse proxy to internal https site.

Expected results:
Working reverse proxy to internal https site.

Additional info:

Comment 1 bitjunks 2018-04-12 12:54:42 UTC
Actual results:
HTTP 500 Internal Server Error

Comment 2 bitjunks 2018-04-12 13:16:20 UTC
Manually upgraded to httpd-2.4.33-3 using the rpm files and got the same results.

Comment 3 Joe Orton 2018-04-12 13:20:54 UTC
Yes, the SSL<->mod_proxy interface changed with 2.4.33 which broke the hack we have to allow mod_ssl and mod_nss to co-exist.  This is different to bug 1564537.

Comment 4 Joe Orton 2018-04-12 13:26:22 UTC
I don't have time to work on this right now so maybe  ask the mod_nss team to look at updating the -multiproxy patch.

Comment 5 bitjunks 2018-04-12 14:22:20 UTC
Opened https://pagure.io/mod_nss/issue/45

Comment 6 Rob Crittenden 2018-04-13 15:19:22 UTC
Created attachment 1421422 [details]
Proposed update to httpd-2.4.18-sslmultiproxy.patch

Note that mod_nss needs a separate update in order to add support for ssl_engine_set which is being worked on upstream. This patch alone is not sufficient to re-enable proxy support in mod_nss.

Comment 7 Fedora Update System 2018-04-13 19:50:26 UTC
mod_nss-1.0.14-7.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ab81c2a120

Comment 8 Fedora Update System 2018-04-15 16:22:35 UTC
mod_nss-1.0.14-7.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-ab81c2a120

Comment 9 bitjunks 2018-04-15 23:38:42 UTC
I downloaded mod_nss-1.0.14-7.fc27 from the testing repository and it worked flawlessly. Should I close the issue or are you going to do so?

Comment 12 Joe Orton 2018-04-16 07:42:26 UTC
Well I managed to screw up applying a patch pretty badly...

Thanks for the updated patch, Rob!

I think that doing this unconditionally in ssl_engine_set() is going to always disable proxy-SSL support in mod_ssl when mod_nss is loaded, even if the mod_nss proxy support is not configured?

    if (othermod_engine_set) {
        return othermod_engine_set(c, per_dir_config, proxy, enable);

Comment 13 Rob Crittenden 2018-04-16 14:56:39 UTC
I think you're right. I'm just not sure how to get the right information from the connection to know what to do.

The previous logic was basically: if you want to do a SSL proxy connection and mod_ssl doesn't want this particular one, send it off to othermod to see if it wants it.

So I'd think we'd want to look at sslconn->dc->proxy_enabled but isn't that what is being set here in the first place?

I think I need to read some more code.

As an aside, I added the mod_nss build here more as a heads-up and to track it.

This bug is more about mod_nss playing nice with mod_ssl when both are enabled and trying to do proxying within mod_nss. Only one module can register the set of proxy callbacks so mod_ssl will handle relaying the connection if mod_nss is installed and mod_ssl isn't going to handle the request itself.

Comment 14 Fedora Update System 2018-05-05 22:24:53 UTC
mod_nss-1.0.14-7.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 bitjunks 2018-05-06 22:43:58 UTC
what about Fedora 28?

Comment 16 bitjunks 2018-05-06 22:58:29 UTC
(In reply to bitjunks from comment #15)
> what about Fedora 28?

ok found it. mod_nss-1.0.16-5.1 is still on the testing repository.

Comment 17 Ben Cotton 2018-11-27 15:48:05 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 18 Ben Cotton 2018-11-30 21:29:51 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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