2013-09-01 57 views
3

我最近上传了一些新文件到我的生产服务器(并覆盖旧的),现在我得到500内部服务器错误。服务器正在运行phusion乘客(即使我不再收到该错误消息),并且在我的本地测试环境中,一切似乎都正常工作。500内部服务器错误与导轨生产

这里是网站:http://www.pandonews.com/

当我在Apache日志看我看到这个错误:

[ pid=3106 thr=140057117177664 file=ext/apache2/Hooks.cpp:884 time=2013-09-01 17:37:24.84 ]: Unexpected error in mod_passenger: Cannot spawn application '/var/www/feedme': The spawn server died unexpectedly, and restarting it failed. 
    Backtrace: 
    in 'virtual Passenger::SessionPtr Passenger::ApplicationPool::Client::get(const Passenger::PoolOptions&)' (Client.h:742) 
    in 'Passenger::SessionPtr Hooks::getSession(const Passenger::PoolOptions&)' (Hooks.cpp:312) 
    in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:585) 

我不知道是什么问题。到目前为止它一直运行良好。为了解决这个问题,我不知道从哪里开始。我试着再次运行gem乘客安装,但没有发生任何事情。

近期活动:

  • 安装PG宝石(但是从宝石文件中删除它现在决定留在sqlite3的为后)的YML文件应该没问题...
  • 试图在服务器上运行包更新并在本地但它一直挂
  • 改变了一些JavaScript和CSS文件...
  • 试图与RAILS_ENV =生产耙重置服务器:DB复位 - 没有任何变化!

编辑: 运行轨道的生产时,我得到以下错误:

/home/otto/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rack/handler/production (LoadError) 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `block in require' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:236:in `load_dependency' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `require' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/handler.rb:63:in `try_require' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/handler.rb:16:in `get' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:272:in `server' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.7/lib/rails/commands/server.rb:59:in `start' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.7/lib/rails/commands.rb:55:in `block in <top (required)>' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap' 
from /home/otto/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.7/lib/rails/commands.rb:50:in `<top (required)>' 
from script/rails:6:in `require' 
from script/rails:6:in `<main>' 

EDIT2:

$ passenger-status 
ERROR: Phusion Passenger doesn't seem to be running. 

EDIT3: 好像它正在运行,仍然是内部服务器错误:

passenger start -a 0.0.0.0 -p 3000 -d -e production 
=============== Phusion Passenger Standalone web server started =============== 
PID file: /var/www/feedme/tmp/pids/passenger.3000.pid 
Log file: /var/www/feedme/log/passenger.3000.log 
Environment: production 
Accessible via: http://0.0.0.0:3000/ 

Serving in the background as a daemon. 
=============================================================================== 
[email protected]:/var/www/feedme$ passenger status 
Phusion Passenger Standalone is running on PID 18788, according to PID file /var/www/feedme/tmp/pids/passenger.3000.pid 
[email protected]:/var/www/feedme$ 
+0

和您的生产日志中会出现什么?如果您尝试手动中断应用程序(如“rails s production”),通常会运行rails进程的用户登录,会发生什么情况? – fotanus

+0

3.2.7上的所有轨道宝石?似乎它可能是一个版本不兼容。 – Kyle

回答

2

做了以下内容:从根乘客配置-root

  • 给chmod命令所有,直到用户名文件夹:

    1. 创业板安装乘客(不须藤或任何东西)
    2. 查找根源: sudo chmod -R 777 /home/username/.rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.14到/ home/username/
    3. passenger-install-apache2-module(没有任何东西)
    4. 拿你的代码是给里面的贴吧:/etc/apache2/httpd.conf
    5. 须藤服务的Apache2重启
  • +0

    当前-root不起作用它的乘客配置 - root – gustavoanalytics

    +0

    使用“乘客配置验证 - 安装”它应该引导您修理您的乘客设置。 –