Elastic Beanstalk&Rails - nginx错误“未定义的局部变量或方法`location_config_filename'”

问题描述 投票:1回答:1

我正在尝试将我的Rails5应用程序部署到eb容器(ruby 2.5乘客独立),但nginx错误仍然存​​在。我该怎么做才能解决这个问题?

: Completed activity. Result:
+ service passenger restart
According to the PID file '/var/app/support/pids/passenger.pid',
Phusion Passenger Standalone doesn't seem to be running.

If you know that Phusion Passenger Standalone *is* running then one of these
might be the cause of this error:

* The Phusion Passenger Standalone instance that you want to stop isn't running
on port 80, but on another port. If this is the case then you
should specify the right port with --port.
If the instance is listening on a Unix socket file instead of a TCP port,
then please specify the PID file's filename with --pid-file.
* The instance that you want to stop has stored its PID file in a non-standard
location. In this case please specify the right PID file with --pid-file.
/opt/elasticbeanstalk/support/conf/nginx_config_healthd.erb:49:in `get_binding': undefined local variable or method `location_config_filename' for #<PhusionPassenger::Standalone::StartCommand:0x000056170aa02450> (NameError)
from /opt/rubies/ruby-2.5.0/lib/ruby/2.5.0/erb.rb:885:in `eval'
from /opt/rubies/ruby-2.5.0/lib/ruby/2.5.0/erb.rb:885:in `result'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:187:in `block in write_nginx_config_file'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:180:in `open'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:180:in `write_nginx_config_file'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:42:in `start_engine_real'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb:323:in `start_engine'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb:63:in `run'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/src/ruby_supportlib/phusion_passenger/standalone/main.rb:51:in `run!'
from /opt/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.2.1/bin/passenger:45:in `<top (required)>'
from /opt/rubies/ruby-2.5.0/bin/passenger:23:in `load'
from /opt/rubies/ruby-2.5.0/bin/passenger:23:in `<main>'
ruby-on-rails nginx elastic-beanstalk passenger amazon-elastic-beanstalk
1个回答
0
投票

你在你的Gemfile中包含passenger gem吗?如果是这样,请确保它仅用于非生产组。 EB预装了乘客,因此如果您将其作为应用程序的一部分进行安装,您将看到冲突。

根据经验,您可能需要拆除您的实例并重新启动它以从中恢复...

© www.soinside.com 2019 - 2024. All rights reserved.