View previous topic :: View next topic |
Author |
Message |
saber850 Tux's lil' helper
Joined: 21 Mar 2004 Posts: 115 Location: NY
|
Posted: Thu Jan 17, 2013 5:24 pm Post subject: Apache stopped starting |
|
|
I restarted my computer yesterday and (for the first time in a very long time) Apache didn't start.
I looked into the problem and the error log (var/log/apache2/error_log) reports this:
Code: |
[Thu Jan 17 11:47:42 2013] [error] (2)No such file or directory: Cannot create SSLMutex with file `/var/run/apache2/ssl_mutex'
|
Sure enough the directory--/var/run/apache2--does not exist, and hence the error (and this is enough for apache to fail to start all together--it does not just disable SSL support).
I've confirmed that if I manually create the /var/run/apache2 directory and attempt to start apache, it works.
So I understand the problem, but I don't know what provoked this change, nor how to properly fix it.
Regarding what changed: The last time I restarted the computer was ~2 months ago, and everything started up fine. AFAIK, I didn't modify anything relating to apache since then, but I do keep my system up to date via daily emerge -uavND world.
So what is the proper way to fix this? Will the directory that I manually created persist through a reboot? Should one of the apache startup scripts create this directory? |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Thu Jan 17, 2013 6:20 pm Post subject: |
|
|
Have you etc-update/dispatch-conf after upgrading apache?
It appears the SSL mutex file is defined in /etc/apache2/modules.d/40_mod_ssl.conf for me...
/var/run should be on tmpfs nowadays, so it will disappear on reboots. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
saber850 Tux's lil' helper
Joined: 21 Mar 2004 Posts: 115 Location: NY
|
Posted: Thu Jan 17, 2013 8:26 pm Post subject: |
|
|
eccerr0r wrote: | Have you etc-update/dispatch-conf after upgrading apache? |
First, note that apache hasn't been rebuilt for me since Oct 17, 2012 (and I'm note sure that was an actual update or just a rebuild due to use flag changes).
But to answer your question, yes, I run etc-update when emerge informs me there are config files to be merged, and occasionally otherwise.
eccerr0r wrote: | It appears the SSL mutex file is defined in /etc/apache2/modules.d/40_mod_ssl.conf for me... |
Yes, same for me.
eccerr0r wrote: | /var/run should be on tmpfs nowadays, so it will disappear on reboots. |
Yes, that's the case for me:
Code: | # ls -hal /var/run
lrwxrwxrwx 1 root root 4 Dec 20 00:23 /var/run -> /run
# mount | grep run
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755) |
So I'm still faced w/ figuring how best to create this directory upon reboot. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Thu Jan 17, 2013 10:44 pm Post subject: |
|
|
So did you fix the configuration file that specifies the mutex file?
Code: | doujima:/etc/apache2/modules.d$ equery list apache
* Searching for apache ...
[IP-] [ ] www-servers/apache-2.2.23:2
doujima:/etc/apache2/modules.d$ grep -i sslmutex 40_mod_ssl.conf
SSLMutex file:/var/run/ssl_mutex
doujima:/etc/apache2/modules.d$
|
Written straight into /var/run which is always there, for me.
And USE flag changes can still require config file changes. Every time something merges, you have the possibility of needing to fix a config file even if it's just USE file changes.
And oh... yes... baselayout was probably revved within the last few months. The /var/run -> /run was a fairly recent change... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
saber850 Tux's lil' helper
Joined: 21 Mar 2004 Posts: 115 Location: NY
|
Posted: Fri Jan 18, 2013 5:55 am Post subject: |
|
|
eccerr0r wrote: | So did you fix the configuration file that specifies the mutex file?
Code: | doujima:/etc/apache2/modules.d$ equery list apache
* Searching for apache ...
[IP-] [ ] www-servers/apache-2.2.23:2
doujima:/etc/apache2/modules.d$ grep -i sslmutex 40_mod_ssl.conf
SSLMutex file:/var/run/ssl_mutex
doujima:/etc/apache2/modules.d$
|
Written straight into /var/run which is always there, for me.
|
As of this writing, I have not done anything for a permanent fix--that's what I'm trying to find out: what is the proper fix. There are multiple possibilities that I'm aware of. One is as you've shown: change the configuration to use a directory which is expected to be there upon boot. Another is to have a script create the directory.
I guess I'm asking if there is a prescriptive suggestion, possibly to align w/ however apache would be deployed on a fresh system (my install of Gentoo took place ~2004).
eccerr0r wrote: | And USE flag changes can still require config file changes. Every time something merges, you have the possibility of needing to fix a config file even if it's just USE file changes. |
Right, I'm aware of that, I just didn't want to get off topic. But since the topic is upon us... I run etc-update when emerge informs me there are config files to be merged, and occasionally otherwise. Is that problematic?
eccerr0r wrote: | And oh... yes... baselayout was probably revved within the last few months. The /var/run -> /run was a fairly recent change... |
Good to know, thanks. |
|
Back to top |
|
|
|
|
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
|
|