"passenger-config restart-app" fails with wrong error message if no instance is running
Issue report
Are you sure this is a bug in Passenger? Quite sure, yes.
Please try with the newest version of Passenger to avoid issues that have already been fixed passenger-6.0.4
Question 1: What is the problem?
The CLI passenger-config restart-app /path/to/app fails with "ERROR: You are not authorized to query the status for this Phusion Passenger instance" if no instance of the app is currently running.
This is a known limitation, however, the error message is wrong and should a more comprehensible as per cdb46b0 – also see https://github.com/phusion/passenger/issues/1392#issuecomment-111175373:
puts "#{PROGRAM_NAME} is currently not serving any applications."
-
What is the expected behavior? More comprehensible error message (see above).
-
What is the actual behavior? Misleading error message: "ERROR: You are not authorized to query the status for this Phusion Passenger instance"
-
How can we reproduce it? On a Nginx vhost "app.domain.com" which does not set
passenger_pre_start:
/etc/init.d/nginx restart
passenger-control restart-app /path/to/app
# => FAIL
curl http//app.domain.com
passenger-control restart-app /path/to/app
# => SUCCESS
Question 2: Passenger version and integration mode: open source 6.0.4 on Nginx
Question 3: OS or Linux distro, platform (including version): Gentoo
Question 4: Passenger installation method: RubyGems + Gemfile