1

I'm trying to deploy my Rails5 app to eb container ( ruby 2.5 passenger standalone), but nginx error persists. how should I do to fix this?

: 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>'
kansiho
  • 532
  • 4
  • 18

1 Answers1

0

Are you including the passenger gem in your Gemfile? If so, make sure it's only used in non-production groups. EB comes with passenger pre-installed, so if you're installing it as part of your application, you will see conflicts.

Speaking from experience, you may need to tear down your instance and relaunch it to recover from this...

Brian
  • 5,300
  • 2
  • 26
  • 32
  • actually, I don't add passenger gem in gemfile. – kansiho Mar 06 '18 at 14:44
  • Where is passenger version 5 coming from then? EB bundles passenger version 4. – Brian Mar 06 '18 at 19:29
  • Thank you @Brian, I've wrongly added passenger in gem once, maybe at that time. – kansiho Mar 07 '18 at 00:51
  • All it would take is once - while EB rebuilds your application directory `/var/app/current` from scratch, it caches gems indefinitely. Glad to hear you were able to figure it out! – Brian Mar 07 '18 at 13:54