3

Whenever I try sudo apache2ctl start I receive the following message:

AH00534: apache2: Configuration error: More than one MPM loaded.
Action '-k restart' failed.
The Apache error log may have more information.

When I check /var/log/apache2/error.log, there are no entries for this error. The only mods being included seem to be in /etc/apache2/mods-enabled/, and all I see listed there as related to "mpm" are:

  1. mpm_prefork.conf
  2. mpm_prefork.load

In /etc/apache2/mods-available/, there are the following listed:

  1. mpm_event.conf
  2. mpm_event.load
  3. mpm_prefork.conf
  4. mpm_prefork.load
  5. mpm_worker.conf
  6. mpm_worker.load

However, my apache2.conf file does not load those in mods-available directory.

This is new territory to me, so I may be totally looking in wrong place. Thanks in advance for your help!

JamieHoward
  • 131
  • 1
  • 1
  • 4
  • Try `grep -r mpm_ /etc/apache2` and ignore anything in the `*-available` subdirs. – Felix Frank Nov 21 '14 at 15:40
  • All that are returned are in the mods-available directory. – JamieHoward Nov 21 '14 at 15:51
  • Hm, my bad. That would not help at all. - Weird, it would actually appear that each MPM has a distinct binary on Debian/Ubuntu. It's unclear how that error can occur. Have you tried removing all `apache2-mpm-*` packages except for prefork? – Felix Frank Nov 22 '14 at 19:28
  • Here it is mid-2015 and I'm getting the same problem with Vagrant+Ubuntu. There is only one module being loaded. I think what changed was that I did an apt-get update. Were you able to fix it? – Jeremy Harris Aug 21 '15 at 19:40
  • @cillosis This just happened to me too.. all solutions to this problem don't work for this case. Did you solve it? – SamV Aug 27 '15 at 10:43

1 Answers1

3

This cannot happen in Apache v2.2 (which the question is tagged as), it can only happen in Apache v2.4 where you can compile the three MPMs as dynamically loadable modules.

Search all your configuration files for the following three lines. The paths maybe different of course, depending on your installation. There can only ever be one of these three modules actually loaded. If more than one are present and uncommented you will get the error you mention:

# Only *ONE* of these modules may be uncommented in a valid configuration
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule mpm_worker_module modules/mod_mpm_worker.so

If you somehow managed to get an Apache installation with one of the MPMs compiled into the httpd binary itself and with one or more of the MPMs as a loadable module then you might also get this.

Run /path/to/httpd -l to see if there is an MPM built in and then search for the above lines as before

Unbeliever
  • 2,336
  • 1
  • 10
  • 19