Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-11075

apache : wsgi module not working in CentOS9

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: apache
    • Labels:
      None
    • Template:
      MODULES Bug Template
    • QA Risk Assessment:
      Needs Assessment

      Description

      Module Version: 6.1.0
      Puppet Version: puppet 7.7.7 (from master branch with ruby3 patches)
      OS Name/Version: CentOS Stream 9 (preview)

      I'm testing puppet-apache with CentOS9 preview (available repos in [1]) and I'm hitting some issues with mod_wsgi.

      Desired Behavior:

      Behavior in CentOS9 should be similar to CentOS8.

      Actual Behavior:

      Example manifest:

      # cat test1.pp 
      class { 'apache': }
       
      apache::vhost { 'user.example.com':
        port          => '80',
        docroot       => '/var/www/html/test1',
      } 
       
      apache::vhost { 'wsgi.example.com':
        port                        => '80',
        docroot                     => '/var/www/pythonapp',
        wsgi_application_group      => '%{GLOBAL}',
        wsgi_daemon_process         => 'wsgi',
        wsgi_daemon_process_options => {
          processes    => '2',
          threads      => '15',
          display-name => '%{GROUP}',
        },
        wsgi_import_script          => '/var/www/demo.wsgi',
        wsgi_import_script_options  => {
          process-group     => 'wsgi',
          application-group => '%{GLOBAL}',
        },
        wsgi_process_group          => 'wsgi',
        wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
      }
      

      Error:
       
      Notice: Compiled catalog for centos9-1 in environment production in 0.78 seconds
      Notice: /Stage[main]/Main/Apache::Vhost[wsgi.example.com]/File[/var/www/pythonapp]/ensure: created
      Notice: /Stage[main]/Apache::Mod::Wsgi/Apache::Mod[wsgi]/Package[mod_wsgi]/ensure: created
      Notice: /Stage[main]/Apache::Mod::Wsgi/File[wsgi.conf]/ensure: defined content as '{sha256}19cb9bd7248ea35b8e882d1d21458b114cfa18be60fb8acbf1eb5cc9cab1afb7'
      Notice: /Stage[main]/Apache::Mod::Wsgi/Apache::Mod[wsgi]/File[wsgi.load]/ensure: defined content as '{sha256}8196a509f90fa10b9464d1c58f4a13d558259e863ccc2761ee1e2c2fcd323f45'
      Notice: /Stage[main]/Main/Apache::Vhost[wsgi.example.com]/Concat[25-wsgi.example.com.conf]/File[/etc/httpd/conf.d/25-wsgi.example.com.conf]/ensure: defined content as '{sha256}e0b889817c4387fbb4c01066be06f058554422125d3fff67a6ee03dcbf9b7f53'
      Error: /Stage[main]/Apache::Service/Service[httpd]: Failed to call refresh: Systemd restart for httpd failed!
      journalctl log for httpd:
      -- Journal begins at Thu 2021-05-20 11:28:08 UTC, ends at Thu 2021-05-20 11:48:32 UTC. --
      May 20 11:46:30 centos9-1 systemd[1]: Starting The Apache HTTP Server...
      May 20 11:46:30 centos9-1 systemd[1]: Started The Apache HTTP Server.
      May 20 11:46:30 centos9-1 httpd[22360]: Server configured, listening on: port 80
      May 20 11:48:31 centos9-1 systemd[1]: Stopping The Apache HTTP Server...
      May 20 11:48:32 centos9-1 systemd[1]: httpd.service: Deactivated successfully.
      May 20 11:48:32 centos9-1 systemd[1]: Stopped The Apache HTTP Server.
      May 20 11:48:32 centos9-1 systemd[1]: Starting The Apache HTTP Server...
      May 20 11:48:32 centos9-1 httpd[22501]: httpd: Syntax error on line 40 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/wsgi.load: Cannot load modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: cannot open shared object file: No such file or directory
      May 20 11:48:32 centos9-1 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
      May 20 11:48:32 centos9-1 systemd[1]: httpd.service: Failed with result 'exit-code'.
      May 20 11:48:32 centos9-1 systemd[1]: Failed to start The Apache HTTP Server.
       
      Error: /Stage[main]/Apache::Service/Service[httpd]: Systemd restart for httpd failed!
      journalctl log for httpd:
      -- Journal begins at Thu 2021-05-20 11:28:08 UTC, ends at Thu 2021-05-20 11:48:32 UTC. --
      May 20 11:46:30 centos9-1 systemd[1]: Starting The Apache HTTP Server...
      May 20 11:46:30 centos9-1 systemd[1]: Started The Apache HTTP Server.
      May 20 11:46:30 centos9-1 httpd[22360]: Server configured, listening on: port 80
      May 20 11:48:31 centos9-1 systemd[1]: Stopping The Apache HTTP Server...
      May 20 11:48:32 centos9-1 systemd[1]: httpd.service: Deactivated successfully.
      May 20 11:48:32 centos9-1 systemd[1]: Stopped The Apache HTTP Server.
      May 20 11:48:32 centos9-1 systemd[1]: Starting The Apache HTTP Server...
      May 20 11:48:32 centos9-1 httpd[22501]: httpd: Syntax error on line 40 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/wsgi.load: Cannot load modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: cannot open shared object file: No such file or directory
      May 20 11:48:32 centos9-1 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
      May 20 11:48:32 centos9-1 systemd[1]: httpd.service: Failed with result 'exit-code'.
      May 20 11:48:32 centos9-1 systemd[1]: Failed to start The Apache HTTP Server.
       
      Notice: Applied catalog in 3.04 seconds
      

      The problem seems realated to missing params for centos9 in params.pp.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            amoralej Alfredo Moralejo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support