5

Apache isn't booting on our production server (all of a sudden) and there are no error messages. Can anyone help me fix this or help me start debugging?

init.d fails:

/etc/init.d/httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [FAILED]

Configtest

Syntax OK

Apache:

Server version: Apache/2.2.3
Server built:   Nov 12 2012 08:48:46

Server:

CentOS release 5.8 (Final)

Booting with debug:

/usr/sbin/httpd -e debug -X
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module auth_basic_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module auth_digest_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_file_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_alias_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_anon_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_dbm_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_default_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_host_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_user_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_owner_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_groupfile_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_dbm_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_default_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ldap_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authnz_ldap_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module include_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module log_config_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module logio_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module env_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ext_filter_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mime_magic_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module expires_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module deflate_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module headers_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module usertrack_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module setenvif_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mime_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dav_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module status_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module autoindex_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module info_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dav_fs_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module vhost_alias_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module negotiation_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dir_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module actions_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module speling_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module userdir_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module alias_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module rewrite_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_balancer_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_ftp_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_http_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_connect_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module suexec_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module disk_cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module file_cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mem_cache_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module cgi_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module version_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ssl_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module perl_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module php5_module
[Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_ajp_module
<At this point it exits>

/var/log/httpd/error_log

[Sun Dec 16 20:10:16 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Dec 16 20:10:16 2012] [info] Init: Seeding PRNG with 256 bytes of entropy
[Sun Dec 16 20:10:16 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Sun Dec 16 20:10:16 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Sun Dec 16 20:10:16 2012] [info] Init: Initializing (virtual) servers for SSL
EricR
  • 199
  • 4
  • 12

2 Answers2

4

SSL issues are the likely candidate for silent failures. With no log information, I would work backwards. If you're keeping server specific configs in conf.d, I'd move them all out, get it started, and add them back one by one. Or depending on how big your config is, I would comment things out, get it started and then uncomment until it fails to start.

Jerry
  • 126
  • 3
  • Ah, forgot that in my answer. first thing I did. `Syntax OK` – EricR Dec 17 '12 at 01:24
  • Figured that would be the case, but it could have revealed low hanging fruit. Do you see anything in the messages or secure log? I believe cert issues would exit silently from the Apache point of view for security reasons. – Jerry Dec 17 '12 at 01:31
  • Nothing in either `/var/log/messages` or `/var/log/secure` – EricR Dec 17 '12 at 01:33
  • Verify the log file paths/perms in the conf file. I just verified incorrect log file paths cause start-up to fail silently. It also passes checkconfig. – Jerry Dec 17 '12 at 01:40
  • All logs are `root:root 644`, parent folder is `root:root 600`, starting as root. Log paths are confirmed correct and being used by `httpd`. – EricR Dec 17 '12 at 01:48
  • Most posts I have read point to SSL. At this point I would work backwards. If you're keeping server specific configs in conf.d, I'd move them all out, get it started, and add them back one by one. Or depending on how big your config is, I would comment things out, get it started and then uncomment until it fails to start. – Jerry Dec 17 '12 at 01:55
  • Fair enough idea. I'll attempt that now. Cheers. – EricR Dec 17 '12 at 01:57
  • @Jerry Can you edit the relevant information into your Post. It's not an Answer and while it would win you final Jeopardy, we don't allow questions as Answers. – Chris S Dec 17 '12 at 02:20
  • @EricR, There's a related thread here: http://serverfault.com/q/459275/87017 – Pacerier Apr 15 '16 at 18:04
1

Take a backup of your apche conf file and and create a new httpd.conf file with the Listen Directive and see if that helps. Some time modules like Suexec and Proxy causes issue. If apache starts with Listen directive then disable suexec and porxy module and check if this helps.

Pratap
  • 665
  • 6
  • 22