Nginx-Passenger:日志中没有任何错误,但浏览器在服务器上返回错误

时间:2014-02-19 10:34:32

标签: ruby-on-rails nginx passenger

安装了Nginx和Passenger,并部署了一个示例应用程序。不知道出了什么问题。 使用链接 - http://www.xyz.com:8080/high_scores/new

时,请在nginx错误日志中获取以下语句
App 26821 stdout:
[ 2014-02-19 15:33:57.8604 26788/2ab539fa0940 Pool2/SmartSpawner.h:301 ]: Preloader for /home/rails/apps/blog started on PID 26821, listening on unix:/tmp/passenger.1.0.26784/generation-0/backends/preloader.26821
App 26951 stdout:

我可以看到录制命中的访问日志,但除了上述消息外,错误日志中没有任何内容。

关于环境 - Centos 5.x,Rails 4.0.2,Ruby 1.9.3p484

Nginx conf文件条目 -

   server {
      listen 8080;
      server_name www.xyz.com;
      root /home/rails/apps/blog/public;   # <--- be sure to point to 'public'!
      passenger_enabled on;
   }

启动时,Nginx会在错误文件中记录以下消息。

[ 2014-02-19 15:30:57.6547 26785/2b6d8a3dd480 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nobody', 'default_python' => 'python', 'default_ruby' => '/home/rails/.rvm/gems/ruby-1.9.3-p484/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/rails/.rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.37', 'passenger_version' => '4.0.37', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.37', 'web_server_pid' => '26784', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '99', 'web_server_worker_uid' => '99' }
[ 2014-02-19 15:30:57.6610 26788/2ab5380784c0 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.26784/generation-0/request
[ 2014-02-19 15:30:57.6663 26793/2b3acb8e1d70 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.26784/generation-0/logging
[ 2014-02-19 15:30:57.6666 26785/2b6d8a3dd480 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!

在日志中没有发现任何特定错误...但是浏览器也没有显示任何内容。

还有一个观察结果是当我运行以下命令时

  

sudo passenger-status 11298

收到错误 -

  

/usr/bin/env: ruby_executable_hooks: No such file or directory

我是这个环境的新手,因此任何类型的排查建议都会有所帮助。

0 个答案:

没有答案