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
  • Services.exe running at 100% CPU and using 100s of MB of memory - Windows XP SP3 I came across an interesting one in the last few days. This system was a Windows XP system with current updates - SP3, IE 8.... and among other things there was a complaint of very sluggish behavior. I updated the antimalware software installed and ran scans. Malware Bytes antimalware actually......
  • How to Remove SoftBarrier | SoftBarrier Removal Guide Softbarrier is the latest in the long line of Wini rogue antivirus programs that include.... Shieldsafeness (see the shieldsafeness removal guide) as well as... SoftStronghold (softstronghold removal guide) and succeeds the following variants in this prolific family.... Softveteran (see the softveteran removal guide) but.... SoftCop (see the SoftCop removal guide.)......
  • 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......
Blog Traffic Exchange Related Websites
  • Streak day 20! #twit2fit Was a little dehydrated and had allergy issues this morning.  Oh, and scratchy technical shirt, 4.3 miles, an extra 10 pounds, and no band-aids is a bad mix.  Throbbing headache and little stinging sensations. 4.3 miles in 0:41:02, for 09:33/mile pace 4x15 sec strides (up to sub-6 pace) at around......
  • Blog Copyright Blog Copyright is a simple wordpress plugin by the Blog Traffic Exchange. It injects a copyright notice into the blog footer. You can see it in action on this very site. The copyright notice automatically updates the year range as time goes on removing the need to ever revisit your......
  • Download the Google Chrome OS Virtual Machine Last week, Techcrunch reported rumors of the release of the Google Chrome OS. They stated that the info came from a reliable source, and indeed that source was reliable. Google had an event at their headquarters, and indeed provided new details and a demo of the Chrome OS. The......
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