Cannot Restart Apache - Segmentation Fault : Apache Down

Apache goes down and wont come up if we try to start/restart. Here is how the error looks like:

--------------------------------------------------------------------------------------------------------------------------------------
/etc/init.d/httpd restart: httpd not running, trying to start
[Tue May 6 01:31:31 2008] [warn] module bwlimited_module is already loaded, skipping
[Tue May 6 01:31:31 2008] [warn] module php5_module is already loaded, skipping
/etc/init.d/httpd: line 83: 1044 Segmentation fault (core dumped) $HTTPD
/etc/init.d/httpd restart: httpd could not be started

--------------------------------------------------------------------------------------------------------------------------------------

One of the reasons why this could happen is the use of Resin modules along with apache. Resin modules act as a fast servlet runner for apache. It acts as a separate layer that speeds up Java servlet handling. Normally, apache doesen't support JSP pages, Resin modules serves this function too.

Once you come across such an error, follow the steps below to bring apache back online.

1) cd /usr/local/apache/logs

2) Remove the following:

rm -rf ssl*
rm -rf core.*
rm sess*

3) Try to restart apache using apachectl and and /etc/init.d/httpd. Examine the core dump file and see if you can find out
which module is causing the module.

4) If you cannot find out which particular module is causing the issue, find out the php modules that are compiled into
apache using php -m.

5) php -m will list out the modules. You can search for each module in the httpd.conf file. Comment out each module and then try restarting apache . (use /etc/init.d/httpd startssl)Obviously, this is a trial and error method and can consume a little more time. But it is effective. By this way, we can find out which module is causing the trouble.

For example, lets say the Resin module is causing the problem. Then search for "resin" in httpd.conf. You should find something like
"ResinConfigServer 127.0.0.1 6802" comment out the line and restart apache using /etc/init.d/httpd startssl. This should fix the problem.

Bobbin Zachariah 9:14 am

About Bobbin Zachariah

Founder of LinOxide, passionate lover of Linux and technology writer. Started his career in Linux / Opensource from 2000. Love traveling, blogging and listening music. Reach Bobbin Zachariah about me page and google plus page.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.