我正在将我的应用程序部署在 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.
Passenger doesn't seem to be running (Capistrano/Rails/Apache/Ubuntu)
但是没有任何帮助!我已经检查了我的Nginx default_sites,看看我是否指向当前的rails路径,并且一切看起来正确。
感谢您的帮助!
答案 0 :(得分:0)
此问题已通过在restart.txt
中添加my_app_name/current/tmp
来解决:
*这是在服务器中完成的:
* touch my_app_name/current/tmp/restart.txt
并添加:
set :passenger_restart_with_touch, true
在deploy.rb