簡體   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