15z ~ # /etc/init.d/apache2 restart * apache2 has detected an error in your setup: [Wed Oct 17 17:16:47.500613 2012] [core:warn] [pid 5849] AH00111: Config variable ${SVN_REPOS_LOC} is not defined [Wed Oct 17 17:16:47.500683 2012] [core:warn] [pid 5849] AH00111: Config variable ${SVN_REPOS_LOC} is not defined AH00526: Syntax error on line 60 of /etc/apache2/modules.d/40_mod_ssl.conf: Invalid Mutex directory in argument file:/var/run/apache_ssl_mutex * ERROR: apache2 failed to start 15z ~ # mkdir /var/run/apache_ssl_mutex 15z ~ # /etc/init.d/apache2 restart * Starting apache2 ... [Wed Oct 17 17:16:59.417780 2012] [core:warn] [pid 5881] AH00111: Config variable ${SVN_REPOS_LOC} is not defined [Wed Oct 17 17:16:59.417848 2012] [core:warn] [pid 5881] AH00111: Config variable ${SVN_REPOS_LOC} is not defined [ ok ] 15z ~ # Reproducible: Always
15z ~ # emerge --info apache Portage 2.1.11.28 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r3, 3.6.0-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.6.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.2 Timestamp of tree: Wed, 17 Oct 2012 21:00:01 +0000 app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.12 dev-lang/python: 2.7.3-r2, 3.2.3-r1 dev-util/cmake: 2.8.9-r1 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.10.5 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.4 sys-devel/binutils: 2.22.90 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo sunrise chaos x-crappy ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA Q3AEULA AdobeFlash-10 AdobeFlash-10.1 AdobeFlash-10.3 dlj-1.1 sun-bcla-java-vm UbuntuFontFamily Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build=n" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org/" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_US pt pt_BR" MAKEOPTS="-j9" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/sunrise /home/thansen/Projects/chaos /usr/local/overlays/crappy" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X a52 aac aacplus aacs aalib acpi afp alsa amd64 amr apache2 archive asf avahi avi avx banshee bash-completion berkdb bluetooth bluray bonjour btrfs bzip2 cairo call caps cdb cdda cddb cdparanoia cdr cli clutter colord composite consolekit corefonts coverage cracklib crypt css cups curl cxx daap dbus device-mapper directfb djvu dlloader dlna dmi dmraid dri dv dvd dvdr eds eigen empathy enca encode epiphany evo exif expat extras faac faad fam fastcgi fat fbcon fbcondecor ffmpeg fftw firefox flac flickr font-server fontconfig foomaticdb fortran freetype ftp fuse gaim gcj gconf gd gdbm gdm gdu geoclue gif git gjs glade glib glitz gmp gnome gnome-keyring gnome-online-accounts gnome-print gnome-shell go gphoto2 gpm graphviz grilo gs gsf gsm gstreamer gtk gtk2 gtk3 gtkhtml guile gusb hal hfs howl hvm iconv icu id3tag idn ieee1394 imagemagick imap imlib inotify introspection ios iphone ipod ipv6 jack java java6 jbig jce jingle jpeg jpeg2k json kdrive ladspa lame laptop lcd lcms ldap libass libcaca libcanberra libgda libkms libmpeg2 libnl libnotify libproxy libsamplerate libsexy libwww logrotate lua lzma lzo mad map mdadm midi mmap mmx mng modules mono moonlight mp3 mp4 mpeg mpi mplayer msn mtp mudflap multilib musicbrainz mysql mysqli mythtv nautilus ncurses net netlink network networkmanager nfs nls nptl nptlonly nsplugin nss ntfs oauth odbc ogg oggvorbis openexr opengl openmp pam pango parted pcmcia pcre pdf perl php phyp plymouth png pnp policykit postscript ppds pppd pulseaudio python quicktime raptor raw readline resolvconf rtmp samba sasl sdl sendto session slp smp sndfile snmp socialweb sound soup speex spell sql sqlite sqlite3 sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg swig taglib tcl tcltk tcpd telepathy theora threads tiff timidity tk tracker transcode truetype trusted twolame udev udisks unicode upnp usb utf8 utils v4l v4l2 vaapi vala vdpau vim-syntax vorbis vpx wavpack webgl webkit webkit2 webp widescreen wifi wikipedia win64codecs wmf x264 xattr xcb xcomposite xforms xinerama xml xml2 xmp xpm xrandr xslt xulrunner xv xvid xvidinfo xvmc yahoo youtube zeitgeist zeroconf zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="cgi cgid access_compat actions alias auth_basic auth_digest authn_anon authn_alias authn_core authn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cache_disk dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm socache_shmcb so speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" DRACUT_MODULES="plymouth biosdevname bootchart btrfs caps crypt crypt-gpg dmraid dmsquash-live iscsi livenet lvm mdraid multipath nbd nfs ssh-client syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64 pc qemu" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer scripting-beanshell scripting-javascript wiki-publisher" LINGUAS="en en_US pt pt_BR" PHP_TARGETS="php5-4" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel i965 vesa svga nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= www-servers/apache-2.4.3 was built with the following: USE="ldap (multilib) ssl suexec -debug -doc (-selinux) -static -threads" APACHE2_MODULES="access_compat actions alias auth_basic auth_digest authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cache_disk cgi cgid dav dav_fs dav_lock dbd deflate dir env expires ext_filter file_cache filter headers ident imagemap include info lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat log_config logio mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias -asis -cern_meta -charset_lite -dumpio -log_forensic -proxy_ftp -proxy_scgi -reqtimeout -substitute -version" APACHE2_MPMS="prefork -event -itk -peruser -worker" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed"
Created attachment 327028 [details, diff] Make sure the mutex directory exists before actually starting Apache
Created attachment 327030 [details, diff] Creating the mutex directory in /var/run once is useless since its contents vanish after next reboot
I have the same problem on my system since I upgraded to Apache 2.4 This is because the mutex directory is created only once, when Apache is built and vanishes after the next reboot while Apache needs it to start. The attached patches fix it.
*** Bug 439150 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > Created attachment 327030 [details, diff] [details, diff] > Creating the mutex directory in /var/run once is useless since its contents > vanish after next reboot Thank you Christophe for the patches. However, you need to create the apache_ssl_mutex directory before calling checkconfig, because it fails otherwise.
Created attachment 327312 [details] Updated patches This archive contains the latest updates of patches that can be applied to solve this bug. Two repositories have to be modified: gentoo-apache and portage.
Thanks for your feedback Tomas. I updated the patches accordingly and compiled them into a single archive. While at it, I also added the possibility to configure the mutex directory within /etc/conf.d/apache
*** Bug 442744 has been marked as a duplicate of this bug. ***
Almost two month later and I still suffer from this bug. Is there any chance, that it will be fixed in the normal portage tree?
ping! Anybody is reading this?
(In reply to comment #11) > ping! Anybody is reading this? yes, me - but it doesn't help you I fear. Just FWIW I added this line into my init.d - file to fix it: start() { checkpath --directory /var/run/apache_ssl_mutex
(In reply to comment #12) > (In reply to comment #11) > > ping! Anybody is reading this? > > yes, me - but it doesn't help you I fear. > > Just FWIW I added this line into my init.d - file to fix it: > > start() { > checkpath --directory /var/run/apache_ssl_mutex The patch submitted by Christophe Vidal works too :)
The patches of Christophe Vidal does not work for me as expected. I created a local overlay, put the 438758-patch/gentoo-apache-2.4.3.patch in the files directory and patched apache-2.4.3.ebuild with the 438758-patch/portage.patch. Then I generated a new Manifest and reemerged apache. The resulting /etc/init.d/apache2 is identical to the former /etc/init.d/apache2. Thus, I supposed, that I have to modify apache-2.4.3.ebuild further to exploit the gentoo-apache-2.4.3.patch. It needs me almost one hour to find the right method of including the patch. With the attached ebuild and 438758-patch/gentoo-apache-2.4.3.patch of Christophe Vidal it seems to work. Thus my question of Comment 10 is still valid, why these modifications are not as something like apache-2.4.3-r1 included in the standard tree?
Created attachment 333862 [details] The modfied apache-2.4.3.ebuild
It's far easier and less hacky to simply add this line to the conf.d file $(mkdir -p /var/run/apache_ssl_mutex) No need to hack init scripts or ebuilds or anything else until it's properly fixed.
> $(mkdir -p /var/run/apache_ssl_mutex) mkdir -p /var/run/apache_ssl_mutex is enough, does not need the $() expression. (it would execute the string what mkdir would give back, but gladly mkdir doesn't put anything to standard output so there is nothing to execute)
according to this forum post http://forums.gentoo.org/viewtopic-p-7221194.html?sid=c7aba0f3b7eb27c0aa6416ae6ed6c6d5 and this is simplest fix to add to /etc/init.d/apache2 checkconfd() { if [ ! -f /etc/init.d/sysfs ]; then eerror "This init script works only with openrc (baselayout-2)." eerror "If you still need baselayout-1.x, please, use" eerror "apache2.initd-baselayout-1 from /usr/share/doc/apache2-$ fi if [ ! -d /run/apache_ssl_mutex ]; then mkdir /run/apache_ssl_mutex fi
+ 27 Feb 2013; Patrick Lauer <patrick@gentoo.org> +apache-2.4.4.ebuild: + Bump for #459264 #438758
Thanks Patrick for the ebuild. Would it be also possible to incorporate https://bugs.gentoo.org/show_bug.cgi?id=421135?
The mutex directory problem is not fixed in 2.4.4. The directory needs to be created after reboot before invoking the checkconfig or else apache fails to start. --- apache2.orig 2013-02-27 09:34:57.432038237 +0100 +++ apache2 2013-02-27 09:47:14.806711204 +0100 @@ -71,8 +71,8 @@ } start() { - checkconfig || return 1 checkpath --directory /run/apache_ssl_mutex + checkconfig || return 1 ebegin "Starting ${SVCNAME}" # Use start stop daemon to apply system limits #347301
(In reply to comment #21) > The mutex directory problem is not fixed in 2.4.4. +1 issue still in 2.4.4-r1
This issue is not fixed in apache-2.4.4. In order to fix it, the checkpath command needs to be called before checkconfig.
Actually, it does appear fixed in 2.4.4-r1. For those still reporting the problem make sure that /etc/init.d/apache2 looks like: start() { checkpath --directory /run/apache_ssl_mutex checkconfig || return 1 checkpath --directory /run/apache_ssl_mutex
Err, why do we need a _second_ checkpath after checkconfig?
Created attachment 340518 [details] Improved /etc/init.d/apache2 Actually, in further testing. It is not fixed for all cases. Running /etc/init.d/apache2 checkconfig will also cause the error. Because of this, I firmly believe that the checkpath command needs to belong in the checkconfig function. Since it is relatively small, I have attached my entire init script. Patrick, can we get this pushed into a new ebuild? I'm not familiar enough with the apache ebuilds to do it myself.
In this (trivial) patch there is a slightly more intelligent way of determining the mutex file location: https://gist.github.com/L1048576/4053651 I suggest to use that patch or merge the approach in the last attachement with that sed invocation. Paul, would you please REOPEN this bug in order to your last /etc/init.d/apache2 and this comment get attention?
Reopening, since this is not fixed in the current ebuild
*** Bug 463258 has been marked as a duplicate of this bug. ***
I was able to fix this problem on my system by editing /etc/init.d/apache2 so that it reads start() { checkpath --directory /run/apache_ssl_mutex checkconfig || return 1 rather than start() { checkconfig || return 1 checkpath --directory /run/apache_ssl_mutex I'm no expert, but it would make sense that the order matters...need to create the directory before checking to see if exists.
It still fails for me: root@impala:/root(12)# /etc/init.d/apache2 status * status: stopped root@impala:/root(13)# /etc/init.d/apache2 start * apache2 has detected an error in your setup: [Sun Jul 07 22:17:19.278806 2013] [core:warn] [pid 22941:tid 139949428467520] AH00111: Config variable ${SVN_REPOS_LOC} is not defined [Sun Jul 07 22:17:19.278881 2013] [core:warn] [pid 22941:tid 139949428467520] AH00111: Config variable ${SVN_REPOS_LOC} is not defined AH00526: Syntax error on line 60 of /etc/apache2/modules.d/40_mod_ssl.conf: Invalid Mutex directory in argument file:/var/run/apache_ssl_mutex * ERROR: apache2 failed to start root@impala:/root(14)# genlop -t apache | tail Sun Jun 9 15:08:23 2013 >>> www-servers/apache-2.4.4-r3 merge time: 1 minute and 47 seconds. Sat Jun 22 09:45:27 2013 >>> www-servers/apache-2.4.4-r3 merge time: 1 minute and 45 seconds. Sun Jul 7 21:28:21 2013 >>> www-servers/apache-2.4.4-r3 merge time: 2 minutes and 47 seconds.
After upgrading to apache-2.4.6 the issue disappeared.
I enjoyed too early, the error is still there: root@impala:/root(4)# qlist -Iv www-servers/apache www-servers/apache-2.4.6 root@impala:/root(5)# /etc/init.d/apache2 status * status: stopped root@impala:/root(6)# /etc/init.d/apache2 start * apache2 has detected an error in your setup: [Mon Jul 22 09:19:53.291599 2013] [core:warn] [pid 29244:tid 139658675230528] AH00111: Config variable ${SVN_REPOS_LOC} is not defined [Mon Jul 22 09:19:53.291699 2013] [core:warn] [pid 29244:tid 139658675230528] AH00111: Config variable ${SVN_REPOS_LOC} is not defined AH00526: Syntax error on line 60 of /etc/apache2/modules.d/40_mod_ssl.conf: Invalid Mutex directory in argument file:/var/run/apache_ssl_mutex * ERROR: apache2 failed to start
(In reply to Paul Varner from comment #26) > I firmly believe that the checkpath command needs to belong in the > checkconfig function. I have committed a revision bump that makes this change. + 25 Jul 2013; Michael Palimaka <kensington@gentoo.org> +apache-2.4.6-r1.ebuild: + Fix "invalid mutex directory" error when starting wrt bug #438758.
this is not fixed, 2.4.6-r1 still complaining about syntax error in /etc/apache2/modules.d/40_mod_ssl_conf and invalid Mutex directory in argument /var/run/apache_ssl_mutex.
(In reply to Oleg from comment #35) > this is not fixed, 2.4.6-r1 still complaining about syntax error in > /etc/apache2/modules.d/40_mod_ssl_conf and invalid Mutex directory in > argument > /var/run/apache_ssl_mutex. Can you paste the specific errors please?
exactly same as in comment #33 also, there is no /var/run/apache_ssl_mutex created
(In reply to Oleg from comment #37) > also, there is no /var/run/apache_ssl_mutex created What is the output of 'file /var/run'?
root@impala:/usr/src(73)# file /var/run /var/run: symbolic link to `/run' root@impala:/usr/src(74)# file /run /run: directory root@impala:/usr/src(75)# ll -d /var/run /run drwxr-xr-x 24 root root 960 Jul 31 14:05 /run/ lrwxrwxrwx 1 root root 4 Oct 21 2012 /var/run -> /run/
Is it still failing for you too, Juergen?
I could at least once successfull start apache: root@impala:/root(355)# /etc/init.d/apache2 status * status: stopped root@impala:/root(356)# /etc/init.d/apache2 start * Caching service dependencies ... [ ok ] * /run/apache_ssl_mutex: creating directory * Starting apache2 ... [Wed Jul 31 16:48:32.178115 2013] [core:warn] [pid 9409:tid 139734496343872] AH00111: Config variable ${SVN_REPOS_LOC} is not defined [Wed Jul 31 16:48:32.178219 2013] [core:warn] [pid 9409:tid 139734496343872] AH00111: Config variable ${SVN_REPOS_LOC} is not defined [ ok ] root@impala:/root(357)# /etc/init.d/apache2 status * status: started
/var/run: directory
/run/apache_ssl_mutex is created
(In reply to Oleg from comment #42) > /var/run: directory It this on Gentoo or Funtoo?
Well, the init.d script and the default config is a bit inconsistent. I know a normal Gentoo installation makes a symlink from /var/run to /run, making them effectively the same, but this doesn't mean we shouldn't keep the consistency in default config files. The init script tries to create /run/apache_ssl_mutex, while the config says /var/run/apache_ssl_mutex. I don't think there would be much to change one of them to be the very same with the other, regardless we think /var/run should be a symlink to /run.
(In reply to Zoltán Halassy from comment #45) > Well, the init.d script and the default config is a bit inconsistent. I know > a normal Gentoo installation makes a symlink from /var/run to /run, making > them effectively the same, but this doesn't mean we shouldn't keep the > consistency in default config files. You are correct. I have committed a new revision bump that explicitly specifies /run everywhere. + 01 Aug 2013; Michael Palimaka <kensington@gentoo.org> +apache-2.4.6-r2.ebuild: + Explicitly switch to /run everywhere to solve further issues when starting wrt + bug #438758.
yes, comment #45 is reasonable, there shouldn't be failure if /var/run symlink or not.
How about systemd users? Still having that issue on www-servers/apache-2.4.6-r2 with systemd.
Created attachment 354986 [details, diff] tmpfile.d file for apache2 This is what I've been using for systemd. For now I have it in /etc/tmpfiles.d but it should be install by portage to /usr/lib/tmpfiles.d I think I got this file from arch linux but it may have come from elsewhere.
(In reply to Kamil Kamiński from comment #48) > How about systemd users? Still having that issue on > www-servers/apache-2.4.6-r2 with systemd. Please file a new bug about this issue with systemd. This bug is too large and unwieldly to track another issue. Feel free to CC me there.
*** Bug 463526 has been marked as a duplicate of this bug. ***