我剛將我的rails應用程序移動到新機器上。我使用的是Apache 2.2.3和乘客3.0.11。在初始加載數據庫之後,我間歇性地看到一個錯誤,表示rails應用程序無法啓動。下面是我在Apache的錯誤日誌中看到:乘客mod_passenger中的意外錯誤:無法連接到Unix套接字
[Sun Mar 18 04:02:13 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[ pid=10788 thr=47366521234240 file=ext/apache2/Hooks.cpp:860 time=2012-03-18 08:51:10.215 ]: Unexpected error in mod_passenger: Cannot connect to Unix socket '/tmp/passenger.1.0.13044/generation-0/socket': No such file or directory (2)
Backtrace:
in 'Passenger::ApplicationPool::Client* Passenger::ApplicationPool::Client::connect(const std::string&, const std::string&, const Passenger::StaticString&)' (Client.h:438)
in 'Passenger::ApplicationPool::Client* Hooks::getApplicationPool()' (Hooks.cpp:266)
in 'Passenger::SessionPtr Hooks::getSession(const Passenger::PoolOptions&)' (Hooks.cpp:292)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:561)
我做了一些google搜索,但我只能似乎找到乘客的傢伙說給乘客升級到3.0版本,但我已經是3版本。我還看到有人說要改變logrotate腳本來重新啓動Apache而不是重新加載,這對我沒有任何幫助。有人有任何想法嗎?這是我的apache conf for乘客。我使用的是安裝作爲寶石紅寶石企業和乘客的RVM版本:
LoadModule passenger_module /usr/local/rvm/gems/ree-1.8.7-2012.02/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ree-1.8.7-2012.02/gems/passenger-3.0.11
PassengerRuby /usr/local/rvm/wrappers/ree-1.8.7-2012.02/ruby
我也嘗試添加軌道產卵方法是保守型的加入最大池大小,相同的結果。不知道在哪裏轉。
感謝您的幫助。我檢查了我的/ selinux目錄是空的,而我的/ etc/selinux/config文件顯示SELINUX = disabled。作爲一個額外的說明,我在centos上5.7 – 2012-03-21 15:20:01
你的/etc/logrotate.d/httpd是否有'/ sbin/service httpd reload>/dev/null 2>/dev/null ||的postrotate命令。真的嗎?否則,你可能想嘗試重新編譯乘客 - 也許一些底層庫改變了。 – 2012-03-21 16:39:38
它有相同的命令。我讀過關於這個同樣的錯誤消息的一篇文章說,將它從重新加載到重新啓動可以解決他的問題,但對我無效。我看到與重新啓動和重新加載相同的問題。 – 2012-03-21 18:43:54