2012-08-09 173 views
0

我重新啓動我的Apache服務器,通過這個命令 「服務的httpd重新啓動」,並得到以下信息:的Apache httpd的重新啓動失敗

停止的httpd:[FAILED] 開始的httpd:[確定]

問題發生之前,我所做的只是用新的數據庫文件替換舊的數據庫文件。這個數據庫文件將被另一個php文件使用。當我做替換時,我沒有停止httpd。

無法重新啓動apache服務器後,我瀏覽網頁以找到解決方案並嘗試以下方法。

試試看「netstat -lnp | grep httpd」和「lsof -i:80」是否有任何進程綁定端口80.結果是沒有進程。

2)通過移除鎖定SUBSYS這個 「RM -f的/ var /鎖定/ SUBSYS/httpd」 字樣,然後重新啓動再次httpd的,但結果是相同的上述消息:

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

3)似乎沒有工作,即使我重新啓動服務器

如何解決此問題?

的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 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 感謝您的幫助!

+0

你有第一個更新數據庫使用'更新命令',然後重新啓動Apache服務器。 – Sandy8086 2012-08-09 07:47:02

+0

日誌不顯示任何錯誤(或與您的問題相關的任何內容)。它是什麼類型的數據庫文件? '.sql'? – 2012-08-09 07:48:13

+0

嘗試使用'\ etc \ init.d \ apache2 stop'然後'pkill -9 apache2'並啓動。僅供參考。 – 2012-08-09 07:51:27

回答

1

您可以在httpd.conf文件中啓用LogLevel Debug並嘗試啓動該服務。您應該能夠在錯誤日誌中獲得更多詳細信息。順便說一下,你似乎啓用了SSL,所以最有可能它不會是80,但端口443.如果這是一個SSL問題..你可能可以禁用SSL,只需啓用HTTP並檢查Apache的啓動。 也是你配置爲與任何LDAP服務器進行身份驗證交談的apache。

+0

我將LogLevel設置爲Debug。在上面的日誌消息中,你可以在方括號中找到一些「調試」。我還檢查了端口號443,但沒有發現偵聽此端口的進程。當我嘗試所有可能的方法重新啓動httpd,然後使用「service httpd status」進行檢查時,它只是說「httpd已死,但子系統已鎖定」。 – 2012-08-09 17:20:06

0

正面臨着同樣的問題,但

sudo /etc/init.d/apache2 reload 

作品對我蠻好

0

對於我來說,這個工作在RH Linux的:

首先啓用超級用戶模式:

sudo su - 

現在轉到Apache(httpd)終端位置: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 

希望它有助於某人。