代码之家  ›  专栏  ›  技术社区  ›  Rubioli

乘客似乎不在运行(capistrano/rails/nginx/ubuntu)

  •  2
  • Rubioli  · 技术社区  · 6 年前

    我正在中部署我的应用程序 Ubuntu 14.4版 , 红宝石2.3.3 , 恩吉克斯 乘客 . 当我使用 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默认_站点,看看我是否指向当前的Rails路径,一切看起来都是正确的。

    感谢您的帮助!

    1 回复  |  直到 5 年前
        1
  •  0
  •   Rubioli    5 年前

    此问题已通过添加 restart.txt 在里面 my_app_name/current/tmp :

    *在服务器中完成:

    * touch my_app_name/current/tmp/restart.txt

    并添加:

    set :passenger_restart_with_touch, true 在里面 deploy.rb