【问题标题】:Passenger doesn't seem to be running (Capistrano/Rails/Nginx/Ubuntu)乘客似乎没有运行(Capistrano/Rails/Nginx/Ubuntu)
【发布时间】:2018-12-25 00:37:42
【问题描述】:

我正在 Ubuntu 14.4、Ruby 2.3.3、Nginx 和 Passenger 中部署我的应用程序。当我使用capistrano 进行部署时,出现错误:

SSHKit::Command::Failed: passenger-config exit status: 1
passenger-config stdout: Nothing written
passenger-config stderr: *** ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it
is running, then the causes of this problem could be one of:

 1. You customized the instance registry directory using Apache's
    PassengerInstanceRegistryDir option, Nginx's
    passenger_instance_registry_dir option, or Phusion Passenger Standalone's
    --instance-registry-dir command line argument. If so, please set the
    environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory
    and run this command again.
 2. The instance directory has been removed by an operating system background
    service. Please set a different instance registry directory using Apache's
    PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir
    option, or Phusion Passenger Standalone's --instance-registry-dir command
    line argument.

Tasks: TOP => passenger:restart
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as user@IP-Address: passenger-config exit status: 1
passenger-config stdout: Nothing written
passenger-config stderr: *** ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it
is running, then the causes of this problem could be one of:

 1. You customized the instance registry directory using Apache's
    PassengerInstanceRegistryDir option, Nginx's
    passenger_instance_registry_dir option, or Phusion Passenger Standalone's
    --instance-registry-dir command line argument. If so, please set the
    environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory
    and run this command again.
 2. The instance directory has been removed by an operating system background
    service. Please set a different instance registry directory using Apache's
    PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir
    option, or Phusion Passenger Standalone's --instance-registry-dir command
    line argument.

我尝试了几个建议,例如:https://www.pistolfly.com/weblog/en/2016/01/passenger-config-and-passenger-status-result-in-an-error-on-centos7.html

Passenger doesn't seem to be running (Capistrano/Rails/Apache/Ubuntu)

但没有任何帮助!我检查了我的 Nginx default_sites 以查看我是否指向当前的 rails 路径并且一切看起来都正确。

感谢任何帮助!

【问题讨论】:

    标签: ruby-on-rails-4 nginx ubuntu-14.04 capistrano passenger


    【解决方案1】:

    通过在my_app_name/current/tmp 中添加restart.txt 已解决此问题:

    *在服务器中完成:

    *touch my_app_name/current/tmp/restart.txt

    并添加:

    set :passenger_restart_with_touch, true in deploy.rb

    更新

    在最新版本的 capistrano 中,这由 gem 'capistrano-passenger' 处理,并在您的 capfile 中添加 require 'capistrano/passenger'

    【讨论】:

      猜你喜欢
      • 2018-02-13
      • 1970-01-01
      • 1970-01-01
      • 2010-12-14
      • 2011-06-13
      • 2011-04-26
      • 2021-09-03
      • 2012-05-10
      • 1970-01-01
      相关资源
      最近更新 更多