Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache-2.4.3: Invalid Mutex directory
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2662
Location: de

PostPosted: Sun Oct 14, 2012 4:09 pm    Post subject: apache-2.4.3: Invalid Mutex directory Reply with quote

After upgrading apache from 2.2.2 to 2.4.3, that thing refuses to start. First it complained about 70_mod_php5.conf. So I rebuilt php. Now it complains about ssl. Rebuilding openssl didn't help unfortunately:

Code:
/etc/init.d/apache2 start
 * apache2 has detected an error in your setup:
[Sun Oct 14 17:56:05.958259 2012] [core:warn] [pid 8264:tid 140579589965632] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
[Sun Oct 14 17:56:05.958314 2012] [core:warn] [pid 8264:tid 140579589965632] 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


Digging into the failed line:
40_mod_ssl.conf:
Mutex file:/var/run/apache_ssl_mutex ssl-cache


I don't have any idea what to do with this error message.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32026
Location: 56N 3W

PostPosted: Sun Oct 14, 2012 5:20 pm    Post subject: Reply with quote

musv,

/var/run as been moved to /run in tmpfs

Try
Code:
touch /var/run/apache_ssl_mutex
to ensure the file exists, then start apache2 again.
If it works now, it will fail after the next boot as the file will vanish from tmpfs.

All I can get from apache2 is Segmentation Fault, but I'm using gcc-4.7.2 on ARM.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2662
Location: de

PostPosted: Sun Oct 14, 2012 6:08 pm    Post subject: Reply with quote

Code:
touch /var/run/apache_ssl_mutex
/etc/init.d/apache2 start
 * apache2 has detected an error in your setup:
[Sun Oct 14 20:07:23.096968 2012] [core:warn] [pid 12346:tid 140489590036288] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
[Sun Oct 14 20:07:23.097027 2012] [core:warn] [pid 12346:tid 140489590036288] 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

I'll guess, I go back to Apache 2.2.
Back to top
View user's profile Send private message
daniel12345
n00b
n00b


Joined: 15 Oct 2012
Posts: 1

PostPosted: Mon Oct 15, 2012 12:28 pm    Post subject: Reply with quote

Code:
mkdir /var/run/apache_ssl_mutex
helped in my case. But as I'm not using SSL, it is not rellay tested :)
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2662
Location: de

PostPosted: Fri Oct 19, 2012 11:52 am    Post subject: Reply with quote

In my case, it didn't change a thing. The error message still showed up. After downgrading it worked again like expected.

I use the apache server only for my local wiki. Therefore it's no pressure to upgrade. I can wait a year more, until the 2.4 seems more mature.
Back to top
View user's profile Send private message
krizalys
n00b
n00b


Joined: 21 Oct 2012
Posts: 1

PostPosted: Sun Oct 21, 2012 4:35 pm    Post subject: Reply with quote

musv wrote:
In my case, it didn't change a thing. The error message still showed up. After downgrading it worked again like expected.


Do you mean that it did not even work one time? As suggested by Neddy & Daniel, manually creating the missing directory should allow Apache 2.4 to start until you reboot your machine. To solve the problem permanently, the apache init script may be modified.
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2701
Location: Hamburg/Germany

PostPosted: Sun Oct 21, 2012 7:45 pm    Post subject: Reply with quote

Probably this line has to be changed too :
Code:
SSLSessionCache                 shmcb:/run/ssl_scache(512000)

FWIW : https://bugs.gentoo.org/show_bug.cgi?id=438758
Back to top
View user's profile Send private message
Tony0945
Apprentice
Apprentice


Joined: 25 Jul 2006
Posts: 295

PostPosted: Mon Dec 24, 2012 5:38 pm    Post subject: Reply with quote

I fixed this by editing /etc/init.d/apache2 near line 60

Code:

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

# kludge to fix bug
        if [ ! -d /run/apache_ssl_mutex ]; then
                mkdir /run/apache_ssl_mutex
        fi
# end kludge
...



It works now and no warning messages, but I would sure like an official fix instead of a kludge by a guy (me!) who doesn't understand the code.
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1113
Location: 127.0.0.1

PostPosted: Sat Jan 12, 2013 1:31 pm    Post subject: Reply with quote

mkdir /var/run/apache_ssl_mutex


fixed it for me
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2701
Location: Hamburg/Germany

PostPosted: Sat Jan 12, 2013 3:21 pm    Post subject: Reply with quote

Dark Foo wrote:
mkdir /var/run/apache_ssl_mutex


fixed it for me
really - pls reboot and check again
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1113
Location: 127.0.0.1

PostPosted: Sat Jan 12, 2013 3:24 pm    Post subject: Reply with quote

aw ffs :(

edit

adding

mkdir -p /var/run/apache_ssl_mutex

from the bug tracker to the conf.d file seems to have sorted it, even after a reboot :)
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2701
Location: Hamburg/Germany

PostPosted: Sat Jan 12, 2013 3:30 pm    Post subject: Reply with quote

putting this 1 line into the init.d file
Code:
checkpath --directory /var/run/apache_ssl_mutex
directly after "start() {" does the trick too

Last edited by toralf on Sat Jan 12, 2013 3:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1113
Location: 127.0.0.1

PostPosted: Sat Jan 12, 2013 3:31 pm    Post subject: Reply with quote

cool - thanks :)
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
Mr.Aleksandrs
n00b
n00b


Joined: 10 Feb 2013
Posts: 3
Location: Latvia, Riga

PostPosted: Mon Mar 11, 2013 10:35 am    Post subject: Reply with quote

nano -w /etc/apache2/modules.d/40_mod_ssl.conf

Needed just commenting this line

Code:

## Semaphore:
# Configure the path to the mutual exclusion semaphore the SSL engine uses
# internally for inter-process synchronization.
# Mutex file:/var/run/apache_ssl_mutex ssl-cache
</IfDefine>

and

Code:
 
/etc/init.d/apache2 start
 * /run/apache_ssl_mutex: creating directory
 * Starting apache2 ...         


:D
Back to top
View user's profile Send private message
mwoodiupui
n00b
n00b


Joined: 13 Oct 2004
Posts: 37
Location: Indianapolis, IN, USA

PostPosted: Mon Mar 25, 2013 1:04 pm    Post subject: Two things to fix Reply with quote

1: replace "/var/run" with "/run" everywhere in /etc/apache2/modules.d/40_mod_ssl.conf. (The upgrade process should provide a new version of this file with the new paths.)

2: move 'checkpath --directory /run/apache_ssl_mutex' one line up, to be the first line of start(), so that the now-subsequent 'checkconfig || return 1' won't return due to the directory not having been created yet.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum