我有一个运行rails应用程序的apache/客运服务器,当我试图运行乘客状态时会显示这个错误:
passenger-status
ERROR: Phusion Passenger(R) doesn't seem to be running. If you are sure that it is running, then the causes of this problem could be:
1. You customized the instance registry directory using Apache's PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir option, or Phusion Passenger(R) Standalone's --instance-registry-dir command line argument. If so, please set the environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory and run passenger-status 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(R) Standalone's --instance-registry-dir command line argument.
有关过程的LS
admin 3291 0.8 9.4 715484 291352 ? Sl 16:27 0:54 Passenger RubyApp: /srv/production/*******app1 (production)
admin 3721 0.0 2.9 483276 90736 ? Sl 08:27 0:03 Passenger RubyApp: /srv/production/********app2 (production)
admin 10963 0.0 0.0 13132 996 pts/0 S+ 18:17 0:00 grep --color=auto Pass
root 18477 0.0 0.2 399440 7964 ? Ssl 03:40 0:01 Passenger watchdog
root 18480 1.1 0.6 2682448 20956 ? Sl 03:40 10:09 Passenger core
下面是apache文件夹mods-available
中的乘客配置:
LoadModule passenger_module /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.8/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/admin/.rvm/gems/ruby-2.5.5/gems/passenger-6.0.8
PassengerDefaultRuby /home/admin/.rvm/gems/ruby-2.5.5/wrappers/ruby
</IfModule>
我检查了/tmp/文件夹,没有什么看上去像乘客临时文件夹。如何找到和/或设置实例注册表目录?
发布于 2021-08-25 09:11:04
出于安全原因,有一个apache选项隐藏实例registery目录。可以通过将PrivateTmp
设置为true in:/etc/systemd/system/multi-user.target.wants/apache2.service
来更改它
一旦重新启动apache,乘客状态就会正常工作。
https://serverfault.com/questions/1075526
复制相似问题