今天早上apache無法訪問,查看日誌發現
[Thu Feb 21 09:47:48 2008] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:3000 (localhost) failed
[Thu Feb 21 09:47:48 2008] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Feb 21 09:47:48 2008] [error] proxy: HTTP: disabled connection for (localhost)
3000連接埠啟動並執行是ruby的radiant cms系統,所以便懷疑radiant啟動失敗,便手工啟動該服務
[root@localhost ~]# service mongrel_cluster start
Starting all mongrel_clusters…
** !!! PID file tmp/pids/mongrel.3000.pid already exists. Mongrel could be running already. Check your log/mongrel.3000.log for errors.
** !!! Exiting with error. You must stop mongrel and clear the .pid before I’ll attempt a start.
** !!! PID file tmp/pids/mongrel.4000.pid already exists. Mongrel could be running already. Check your log/mongrel.4000.log for errors.
** !!! Exiting with error. You must stop mongrel and clear the .pid before I’ll attempt a start.
[root@localhost ~]# service mongrel_cluster start
Starting all mongrel_clusters…
** !!! PID file tmp/pids/mongrel.4000.pid already exists. Mongrel could be running already. Check your log/mongrel.4000.log for errors.
** !!! Exiting with error. You must stop mongrel and clear the .pid before I’ll attempt a start.
看意思應該是一些臨時檔案存在,所以無法啟動,到該目錄下刪除,重新啟動,果然可以。
發現apache如果在httpd中轉向到其他web server,如果那個web server啟動失敗,則同時會導致apache無法啟動,
所以如果在linux下使用service自動啟動各種服務,需要注意服務的啟動順序。