Apache2 not starting because of ssl_scache file



I mentioned this a while back, but I didn’t go into much detail on a long term solution. Let me re-set the situation. Linux server running apache2. It’s Mandrake (now Mandriva) (an older version.) When the system has suffered abrupt outage (power loss). Everything starts up normally with the exception of httpd2. It claims that it’s running but gives an error message. (For reference here’s the old article. Basically when you try to manually restart you see..

Cannot allocate shared memory: (17)File exists apache


(Not terribly descriptive.) The file it’s talking about though is /var/log/httpd/ssl_scache and of course, manually deleting it and then restarting apache (service httpd start) will work. However, I didn’t mention details of a longer term fix. Basically, this will require editing apache’s startup file. /etc/rc.d/init.d/httpd on Mandrake.

What you want to look for is the section that looks like this…

start() {
for tries in $times_start; do

if [ -x $SBIN/$HTTPDPERL -a ! -e $HTTPDPERLPID ]; then

You should make a bit of an addition here so that it looks like this….

start() {
for tries in $times_start; do

if [ -f /var/log/httpd/ssl_scache ]; then
mv -f /var/log/httpd/ssl_scache /var/log/httpd/old_ssl_scache
fi

if [ -x $SBIN/$HTTPDPERL -a ! -e $HTTPDPERLPID ]; then

So, we’re basically saying IF the file /var/log/httpd/ssl_scache exists, THEN move it to old_ssl_scache. You may have to adjust the location for your setup. So, next time power get’s cut to the server and apache (httpd) starts, it cleans up the stranded file first.

Related Posts

Blog Traffic Exchange Related Posts
  • Network security - how safe is your network? Looking at ARP A while back I did a network security series and one of the points that I mentioned was that it's important to know what is normal for your network. In other words, what machines are NORMALLY connected, what services are normally running, etc. Well, I'm about to start a serious......
  • Virtual Server on Apache to listen on an alternate port In the last few days, I had to set up something a bit unusual with apache. Basically the goal was to have apache listen for connections on two different ports (the standard port 80 and an alternate port 85). The problem was that I wanted different content at each port.......
  • How to Remove Antivirus 360 This should not be confused with Norton 360 which is a legitimate antivirus program (although if you need help removing Norton 360 to reinstall it or another antivirus program you may want to visit my antivirus removal tool list.) What we are talking about this time is a rogue security......
Blog Traffic Exchange Related Websites
  • Netflix - Six Months Later Nearly six months ago, my wife and I decided to get a Netflix subscription. Many of our favorite television weren't going to have full seasons due to the writer's strike. Some, like 24, didn't have seasons at all. We thought that this would be a good time to catch up......
  • How to Program a Car Remote [/caption]If you get a car remote for your vehicle, you will instantly see the many benefits to having one.  You can change the temperature to the optimum level of comfort for your personal taste as well can do other simple tasks that can be a challenge when you have both......
  • FAQ about computer security Q: The virus blocked the registry access and how to get rid of it?A: You can deal with like this: 1. Click on Start -> Run (or Start Search in Windows Vista). 2. Enter GPEdit.msc and then press Enter. 3. Navigate to the following location: User Configuration -> Administrative Templates......
www.pdf24.org    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site