简体   繁体   English

乘客似乎没有在奔跑(Capistrano / Rails / Apache / Ubuntu)

[英]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-statssudo 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.

相关问题 Passenger + Capistrano + Apache = Rails应用程序未运行 - Passenger + Capistrano + Apache = Rails app not running 使用capistrano,passenger和apache部署rails - Deploying rails with capistrano, passenger and apache ***错误:Phusion Passenger似乎没有运行 - *** ERROR: Phusion Passenger doesn't seem to be running 警告:Apache似乎没有使用'prefork','worker'或'event'MPM进行编译-Rails-Apache2-Passenger - WARNING: Apache doesn't seem to be compiled with the 'prefork', 'worker' or 'event' MPM - Rails - Apache2 - Passenger 在 Apache 上设置 Rails 应用程序与乘客 - Rails 似乎没有加载 - Setting up Rails app on Apache with passenger - Rails doesn't seem to load Apache上的乘客:“似乎没有在运行”,应用页面显示403; 接下来是什么? - Passenger on Apache: “doesn't seem to be running”, app page gives 403; what next? Rails Passenger / Capistrano / ubuntu应用不提供资产 - Rails Passenger/Capistrano/ubuntu App not serving assets Rails Ubuntu / passenger / capistrano应用程序资产未部署 - Rails Ubuntu/passenger/capistrano app assets not deploying Apache with Passenger不加载Rails应用程序 - Apache with Passenger doesn't load Rails app 乘客似乎不知道VirtualHost是Rails应用程序 - Passenger doesn't seem to know the VirtualHost is a rails app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM