开发者

Why does Passenger 3.0 with nginx crash on startup(?) then 403s?

On Ubuntu with REE 1.8.7, with nginx 0.8.53 manually compiled with the Passenger 3 module doc installed as per the docs, I get an error in the nginx error log when nginx starts:

Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Phusion Passenger logging agent: an error occurred while sending startup arguments: Broken pipe (32) (-1: Unknown error 18446744073709551615)

I assume this means nginx never starts properly. When I try and view my site after this, I get a 403.

2010/10/22 00:56:47 [error] 13874#0: *1813942 directory index of "/var/ rails/myapp/current/public/" is forbidden, client: 125.197.115.16, server: new.myapp.fm, request: "GET / HTTP/1.1", host: "new.myapp.fm"

I expect the first is probably causing the second. I haven't had any luck googling thi开发者_Go百科s. Can anyone provide insight or help me troubleshoot?


I got this after upgrading to Passenger 3.0.1 as I had not changed the version of Passenger specified by passenger_root in /opt/nginx/conf/nginx.conf. You might need to change the line that looks like this to specify the correct version:

passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.1;

You get told to do this when you install nginx. Hope that helps.


I ran into this problem too, and it was because passenger couldn't find ruby:

tail -f /var/log/nginx/error.log 2011/12/20 00:54:45 [alert] 30300#0: Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Phusion Passenger helper agent: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error) * Passenger ERROR (ext/common/ApplicationPool/../SpawnManager.h:220): Could not start the spawn server: ruby: No such file or directory (2)

Even though ruby was properly listed within the system PATH, it didn't seem to work right until I added:

passenger_ruby = /usr/local/bin/ruby;

(the location of my ruby executable) into the http section of my nginx config.


The problem was that PassengerLoggingAgent wasn't installed when I did 'gem install passenger'. I installed it as per this discussion (by grabbing it from the standalone zip) and everything is fine now: http://groups.google.com/group/phusion-passenger/browse_thread/thread/323dc1c7b0e5ee11

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜