2011年4月9日

[科技] CentOS 5.5更新至5.6後httpd啟動錯誤問題

CentOS在昨天(4/8) release了CentOS 5.6,看完release note後就直接給他更新下去,更新完畢以後發現正在跑的兩個論壇都開不起來,此時httpd服務可以正常啟動、網路也正常,但是無法顯示任何頁面,到/var/log/httpd看了下error_log,會發現有一大堆的錯誤訊息如下:


[Sat Apr 09 12:57:21 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 09 12:57:21 2011] [notice] child pid 4754 exit signal Segmentation fault (11)
[Sat Apr 09 12:57:21 2011] [notice] child pid 4755 exit signal Segmentation fault (11)
[Sat Apr 09 12:57:21 2011] [error] NSS_Initialize failed. Certificate database: /etc/httpd/alias.
[Sat Apr 09 12:57:21 2011] [error] SSL Library Error: -8038 SEC_ERROR_NOT_INITIALIZED
[Sat Apr 09 12:57:22 2011] [error] NSS_Initialize failed. Certificate database: /etc/httpd/alias.
[Sat Apr 09 12:57:22 2011] [error] SSL Library Error: -8038 SEC_ERROR_NOT_INITIALIZED
[Sat Apr 09 12:57:22 2011] [notice] child pid 4752 exit signal Segmentation fault (11)
[Sat Apr 09 12:57:22 2011] [notice] child pid 4757 exit signal Segmentation fault (11)
[Sat Apr 09 12:57:23 2011] [error] NSS_Initialize failed. Certificate database: /etc/httpd/alias.
[Sat Apr 09 12:57:23 2011] [error] SSL Library Error: -8038 SEC_ERROR_NOT_INITIALIZED
[Sat Apr 09 12:57:23 2011] [error] NSS_Initialize failed. Certificate database: /etc/httpd/alias.

這是RHEL 5.6的bug,該bug是因為套件mod_nss 1.0.8-3的安裝後script錯誤造成的,解決方法很簡單,只需要變更/etc/http/alias下*.db檔案的權限即可解決:
# chmod g+r /etc/httpd/alias/*.db
# chgrp apache /etc/httpd/alias/*.db

執行完成以後再重新啟動httpd:
#service httpd restart

應該就可以正常啟動apache並且顯示網頁了 :-)

參考資料:
RHEL 5.6 BUG 669963

後記:
雖然每次遇到這種問題都會想說下次更新系統前一定要先做snapshot,但是都會忘記呀 XDDDD

沒有留言:

張貼留言

嗨!留下你的意見吧