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

apache: lbmethod module load order incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: apache
    • Labels:
      None
    • Template:
      MODULES Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 5.0.0
      Puppet Version: 6.8.0 (Server 6.5.0)
      OS Name/Version: CentOS 7.6

      With apache 2.4.34 installed from httpd24 SCL module and vhosts using the mod_proxy_balancer feature, apache no longer starts, failuing to load a dynamic module due to missing symbol.

      Desired Behavior:

      Apache to start normally.

      Actual Behavior:

      Apache startup fails with error:

      Sep 10 15:39:31 rp1 systemd[1]: httpd24-httpd.service: main process exited, code=exited, status=1/FAILURE
      Sep 10 15:39:31 rp1 httpd-scl-wrapper[31440]: httpd: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/lbmethod_byrequests.load: Cannot load modules/mod_lbmethod_byrequests.so into server: /opt/rh/httpd24/root/etc/httpd/modules/mod_lbmethod_byrequests.so: undefined symbol: ap_proxy_balancer_get_best_worker
      Sep 10 15:39:31 rp1 systemd[1]: httpd24-httpd.service: control process exited, code=exited status=1
      Sep 10 15:39:31 rp1 systemd[1]: Failed to start The Apache HTTP Server.
      Sep 10 15:39:31 rp1 systemd[1]: Unit httpd24-httpd.service entered failed state.
      Sep 10 15:39:31 rp1 systemd[1]: httpd24-httpd.service failed.
      

      Relevant thread: https://serverfault.com/questions/922573/apache2-fails-to-start-after-recent-update-to-2-4-34-no-clue-why

      Confirmed that the order in which the modules are loaded is the cause. /opt/rh/httpd24/root/etc/httpd/conf.modules.d/lbmethod_byrequests.load comes alphabetically before /opt/rh/httpd24/root/etc/httpd/conf.modules.d/proxy_balancer.load and /opt/rh/httpd24/root/etc/httpd/conf.modules.d/proxy.load but requires symbols from one of them.

      My hacky workaround for this, which allows apache to load the modules is:

      -ensure_resource('apache::mod', "lbmethod_${lbmethod}")
      +ensure_resource('apache::mod', "lbmethod_${lbmethod}", {'loadfile_name' => "zz-lbmethod_${lbmethod}.load"})
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            broberts Ben Roberts
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support