[英]Passenger doesn't seem to be running (Capistrano/Rails/Apache/Ubuntu)
Deploying a Rails app using Capistrano to an Ubuntu VM running Apache with Passenger enabled. 使用Capistrano将Rails应用程序部署到运行启用了Passenger的Apache的Ubuntu VM。
I followed this tutorial: https://www.phusionpassenger.com/library/install/apache/install/oss/trusty/ with a few changes given that I'm on 17.04, not 14.04 LTS. 我遵循了本教程: https : //www.phusionpassenger.com/library/install/apache/install/oss/trusty/进行了一些更改,因为我使用的是17.04,而不是14.04 LTS。
passenger-config validate-install
says everything looks fine with both Passenger and Apache. passenger-config validate-install
说,Passenger和Apache都看起来不错。 passenger-memory-stats
shows both Passenger and Apache processes. passenger-memory-stats
显示了Passenger和Apache进程。
I have sudo apache2ctl restart
ed several times, with no warnings. 我有
sudo apache2ctl restart
几次,没有警告。 But passenger-status
, and therefore the passenger-config restart-app
that Capistrano runs, reports that Passenger "doesn't seem to be running." 但是,
passenger-status
以及Capistrano运行的passenger-config restart-app
报告说,Passenger“似乎没有运行”。 So my deploy stops. 因此,我的部署停止了。
There's only one Ruby on the machine, ruby-2.4.1 installed using ruby-install. 机器上只有一个Ruby,即使用ruby-install安装的ruby-2.4.1。 I have
apt-get update
and upgrade
d in case of version mismatches. 如果版本不匹配,我会
apt-get update
and upgrade
d。
Apache logs don't show any errors, certainly none related to Passenger. Apache日志未显示任何错误,当然也没有与“乘客”相关的错误。
Why would Passenger internally disagree, saying that it's both configured properly and there are processes running, but then later saying that it's not running? 为什么乘客内部会不同意,说它们都配置正确并且有进程在运行,但是后来又说它没有运行?
I needed to customize the instance registry directory, as suggested by Tony Vincent: 我需要按照Tony Vincent的建议自定义实例注册表目录:
/etc/apache2/mods-enabled/passenger.conf on the server: 服务器上的/etc/apache2/mods-enabled/passenger.conf:
PassengerInstanceRegistryDir /home/MYUSER/passenger_temp
config/deploy/production.rb in the Rails app: 在Rails应用程序中的config / deploy / production.rb:
set :default_env, { 'PASSENGER_INSTANCE_REGISTRY_DIR' => '/home/MYUSER/passenger_temp' }
Sorry to harp on this but did you run passenger-config validate-install
on the ubuntu server (not osx)? 不好意思,但是您是否在ubuntu服务器(不是osx)上运行
passenger-config validate-install
? Same for passenger-memory-stats
and sudo apache2ctl restart
. 与
passenger-memory-stats
和sudo apache2ctl restart
。
Based on /tmp
not having a passenger.randomstring
dir, it sounds like you are confusing local and remote commands. 基于
/tmp
没有passenger.randomstring
目录,这听起来像是您在混淆本地和远程命令。 /tmp
is the default location for PassengerInstanceRegistryDir
s on Ubuntu so if Passenger is running there should be a dir in /tmp
that starts with passenger.
/tmp
是Ubuntu上PassengerInstanceRegistryDir
的默认位置,因此,如果Passenger运行,则/tmp
中应该有一个以passenger.
开头的目录passenger.
. 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.