-1

I'm restarting my apache server by this command "service httpd restart" and getting the following message:

Stopping httpd: [FAILED] Starting httpd: [ OK ]

Before the problem happened, what I've done is simply to replace an old database file with new one. This database file will be used by another php file. When I did the replacement, I didn't stop httpd.

After failing to restart apache server, I surfed the web to find solution and tried the following methods.

1) Try this "netstat -lnp | grep httpd" and "lsof -i:80" to find if there's any process binding port 80. The result is none process.

2) Remove locked subsys by this "rm -f /var/lock/subsys/httpd" and restart httpd again, but the result is the same as the above message:

Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]

3) It didn't seem to work even if I reboot the server

How to tackle this problem?

The error_log shows the following message:

[Thu Aug 09 15:10:34 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Aug 09 15:10:34 2012] [info] Init: Seeding PRNG with 256 bytes of entropy [Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary DH parameters (512/1024 bits) [Thu Aug 09 15:10:34 2012] [info] Init: Initializing (virtual) servers for SSL [Thu Aug 09 15:10:34 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5 [Thu Aug 09 15:10:34 2012] [notice] Digest: generating secret for digest authentication ... [Thu Aug 09 15:10:34 2012] [notice] Digest: done [Thu Aug 09 15:10:34 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x8541df0 rmm=0x8541e20 for VHOST: localhost.localdomain [Thu Aug 09 15:10:34 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK [Thu Aug 09 15:10:34 2012] [info] LDAP: SSL support available [Thu Aug 09 15:27:26 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Aug 09 15:27:26 2012] [info] Init: Seeding PRNG with 256 bytes of entropy [Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary DH parameters (512/1024 bits) [Thu Aug 09 15:27:26 2012] [info] Init: Initializing (virtual) servers for SSL [Thu Aug 09 15:27:26 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5 [Thu Aug 09 15:27:26 2012] [notice] Digest: generating secret for digest authentication ... [Thu Aug 09 15:27:26 2012] [notice] Digest: done [Thu Aug 09 15:27:26 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x97f4df0 rmm=0x97f4e20 for VHOST: localhost.localdomain [Thu Aug 09 15:27:26 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK [Thu Aug 09 15:27:26 2012] [info] LDAP: SSL support available ssl_error_log: [Thu Aug 09 15:10:34 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Aug 09 15:10:34 2012] [info] Init: Seeding PRNG with 256 bytes of entropy [Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary DH parameters (512/1024 bits) [Thu Aug 09 15:10:34 2012] [info] Init: Initializing (virtual) servers for SSL [Thu Aug 09 15:10:34 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5 [Thu Aug 09 15:10:34 2012] [notice] Digest: generating secret for digest authentication ... [Thu Aug 09 15:10:34 2012] [notice] Digest: done [Thu Aug 09 15:10:34 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x8541df0 rmm=0x8541e20 for VHOST: localhost.localdomain [Thu Aug 09 15:10:34 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK [Thu Aug 09 15:10:34 2012] [info] LDAP: SSL support available [Thu Aug 09 15:27:26 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Aug 09 15:27:26 2012] [info] Init: Seeding PRNG with 256 bytes of entropy [Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary DH parameters (512/1024 bits) [Thu Aug 09 15:27:26 2012] [info] Init: Initializing (virtual) servers for SSL [Thu Aug 09 15:27:26 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5 [Thu Aug 09 15:27:26 2012] [notice] Digest: generating secret for digest authentication ... [Thu Aug 09 15:27:26 2012] [notice] Digest: done [Thu Aug 09 15:27:26 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x97f4df0 rmm=0x97f4e20 for VHOST: localhost.localdomain [Thu Aug 09 15:27:26 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK [Thu Aug 09 15:27:26 2012] [info] LDAP: SSL support available Thanks for any help!

6
  • you have 1st update database using 'update command ' and then restart apache server .
    – Sandy8086
    Aug 9, 2012 at 7:47
  • The logs don't show any errors (or anything related to your problem). What type of database file is it? .sql?
    – uınbɐɥs
    Aug 9, 2012 at 7:48
  • Try to \etc\init.d\apache2 stop then pkill -9 apache2 and start. Just for information.
    – Fabio Mora
    Aug 9, 2012 at 7:51
  • Check also permissions on the apache config files.
    – napolux
    Aug 9, 2012 at 7:52
  • @ShaquinTrifonoff Is there any other log files that show more evidences on the failing restart? I use SQLite(.db3).
    – Frank Yang
    Aug 9, 2012 at 8:30

3 Answers 3

2

Can you enable LogLevel Debug in httpd.conf file and try starting the service. You should then be able to get more details in the error logs. By the way you seem to have SSL enabled so most probably it wouldn't be 80 but port 443. If it is an issue with SSL .. you can probably disable SSL and just enable http and check of apache starts. Also is you apache configured to talk to any LDAP server for authentication.

1
  • I set LogLevel as Debug. You can find a few "debug" in square bracket in the above log messages. I also checked the port number 443, but no process found to listen to this port. When I tried all the possible methods to restart httpd and then checked it using "service httpd status", it just said "httpd dead but subsys locked".
    – Frank Yang
    Aug 9, 2012 at 17:20
0

Was facing the same problem but

sudo /etc/init.d/apache2 reload

works just fine for me

0

For me, this worked on RH Linux:

First enable Super User mode:

sudo su -

Now go to Apache (httpd) location in terminal: cd /usr/sbin

To start Apache server:               httpd -k start
To stop Apache server:                httpd -k stop
Check if httpd service is running:    pgrep httpd

Hope it helps someone.

Not the answer you're looking for? Browse other questions tagged or ask your own question.