繁体   English   中英

乘客5 / Capistrano

[英]Passenger 5 / Capistrano

我正在尝试通过Capistrano将Rails应用程序部署到VPS。 我在VPS上安装了乘客独立,并使用默认配置的capistrano-passenger gem。

运行cap deploy会产生以下输出:

DEBUG [3197887c] Finished in 0.046 seconds with exit status 0 (successful).
DEBUG [fdb1fe0b] Running /usr/bin/env passenger -v as deployer@52.64.82.147
DEBUG [fdb1fe0b] Command: cd /var/www/my_app/releases/20150625021829 && /usr/bin/env passenger -v
DEBUG [fdb1fe0b]    Phusion Passenger version 5.0.11
DEBUG [fdb1fe0b]    
DEBUG [fdb1fe0b]    
DEBUG [fdb1fe0b]    "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
DEBUG [fdb1fe0b]    
DEBUG [fdb1fe0b] Finished in 0.066 seconds with exit status 0 (successful).
INFO [8557b41e] Running /usr/bin/env sudo /usr/bin/env passenger-config restart-app /var/www/my_app --ignore-app-not-running as deployer@52.64.82.147
DEBUG [8557b41e] Command: cd /var/www/my_app/releases/20150625021829 && /usr/bin/env sudo /usr/bin/env passenger-config restart-app /var/www/my_app --ignore-app-not-running
DEBUG [8557b41e]    *** ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it
DEBUG [8557b41e]    
DEBUG [8557b41e]    is running, then the causes of this problem could be one of:
DEBUG [8557b41e]    
DEBUG [8557b41e]    
DEBUG [8557b41e]     1. You customized the instance registry directory using Apache's
DEBUG [8557b41e]    
DEBUG [8557b41e]        PassengerInstanceRegistryDir option, Nginx's
DEBUG [8557b41e]    
DEBUG [8557b41e]        passenger_instance_registry_dir option, or Phusion Passenger Standalone's
DEBUG [8557b41e]    
DEBUG [8557b41e]        --instance-registry-dir command line argument. If so, please set the
DEBUG [8557b41e]    
DEBUG [8557b41e]        environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory
DEBUG [8557b41e]    
DEBUG [8557b41e]        and run this command again.
DEBUG [8557b41e]    
DEBUG [8557b41e]     2. The instance directory has been removed by an operating system background
DEBUG [8557b41e]    
DEBUG [8557b41e]        service. Please set a different instance registry directory using Apache's
DEBUG [8557b41e]    
DEBUG [8557b41e]        PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir
DEBUG [8557b41e]        

我正在使用默认配置。 我能做些什么才能让它发挥作用?

使用set :passenger_restart_with_touch, true作为Passenger 5的变通方法。

这是https://github.com/capistrano/passenger/issues/26中描述的已知问题

我最近碰到了这个,我的情况是因为deploy用户需要对passenger-config命令使用sudoer权限。

你的Gemfile中有宝石'乘客'吗? 确保您的VPS上安装了乘客宝石。 此外,如果您需要Nginx作为Web服务器,请在您的VPS rvmsudo passenger-install-nginx-module上运行以下命令。 如果您需要进一步的帮助,请告诉我。

首先,您应确保乘客当前正在您的服务器上运行,因此请尝试: rvmsudo bundle exec passenger start 如果这样可行,请尝试设置:

set :passenger_in_gemfile, true
set :passenger_restart_with_sudo, true

然后检查cap production passenger:restart的设置cap production passenger:restart
(适用于通过Gemfile安装的Passenger Standalone )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM