Satellite 6.x upgrade failed with 'invalid command NSSOptions error'

Solution Unverified - Updated -

Environment

Red Hat Enterprise Linux 7.x
Red Hat Satellite or Proxy 6.1.x

Issue

  • RedHat Enterprise Linux 7.1 upgraded to 7.2 using 'yum update'
  • After that katello-installer --upgrade executed but it is failing with below error :
root@satellite conf.d]# katello-installer --upgrade
Upgrading...
Upgrade Step: stop_services...
Upgrade Step: start_mongo...
Upgrade Step: migrate_pulp...
Upgrade Step: start_httpd...

Upgrade step start_httpd failed. Check logs for more information.

Resolution

Please add the following before the other include directives in your httpd.conf:

Include conf.modules.d/*.conf

Root Cause

It looks like the option to include the apache configuration files present in /etc/httpd/conf.modules.d is missing from httpd.conf, which results in the mod_nss module not being loaded, which results in the mod_nss options not being recognized.

Diagnostic Steps

# vi /var/log/katello-installer/katello-installer.log

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2016-02-12 23:22:59 EST; 6min ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 4773 ExecStopPost=/usr/bin/kdestroy -A (code=exited, status=0/SUCCESS)
  Process: 4771 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 4769 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
  Process: 4765 ExecStartPre=/usr/libexec/ipa/ipa-httpd-kdcproxy (code=exited, status=0/SUCCESS)
 Main PID: 4769 (code=exited, status=1/FAILURE)

Feb 12 23:22:59 satellite.example.com httpd[4769]: AH00526: Syntax error on line 211 of /etc/httpd/conf.d/nss.conf:
Feb 12 23:22:59 satellite.example.com httpd[4769]: Invalid command 'NSSOptions', perhaps misspelled or defined by a module not included in the server configuration
Feb 12 23:22:59 satellite.example.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Feb 12 23:22:59 satellite.example.com kill[4771]: kill: cannot find process ""
Feb 12 23:22:59 satellite.example.com systemd[1]: httpd.service: control process exited, code=exited status=1
Feb 12 23:22:59 satellite.example.com systemd[1]: Failed to start The Apache HTTP Server.
Feb 12 23:22:59 satellite.example.com systemd[1]: Unit httpd.service entered failed state.
Feb 12 23:22:59 satellite.example.com systemd[1]: httpd.service failed.
Feb 12 23:27:12 satellite.example.com systemd[1]: Stopped The Apache HTTP Server.
Feb 12 23:28:46 satellite.example.com systemd[1]: Stopped The Apache HTTP Server.


# vi /etc/httpd/conf.d/nss.conf

NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    NSSOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
    NSSOptions +StdEnvVars
</Directory>

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.