0

We just installed a new box with Ubuntu 18.04 with passenger and everything run fines, the site is up, but when we do

passenger-status

we get

ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it is running, then the causes of this problem could be:

1. You customized the instance registry directory using Apache's PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir option, or Phusion Passenger Standalone's --instance-registry-dir command line argument. If so, please set the environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory and run passenger-status again.
2. The instance directory has been removed by an operating system background service. Please set a different instance registry directory using Apache's PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir option, or Phusion Passenger Standalone's --instance-registry-dir command line argument.

Cannot find another question that fixes this, it's a clean install, any ideas?

thanks, kevin

user1130176
  • 173
  • 10

1 Answers1

2

I doubt you're still having this issue, but it shows high on a G-search so, the problem I found on Ubuntu 18.04 with Apache and Passenger v5+ is to do with the systemd setup of Apache:

The 'tmp' directories it creates are private to Apache, and so Passenger (which will fall back to looking in /tmp for it's Instance directory, which is the right place in Ubuntu for an apt Passenger install, at least) is unable to find them.

Check for directories like

/tmp/systemd-private-fb68a3a735d5f1b1bfc80f80f3f51b91-apache2.service-lgHlX1

which will have the Passenger tmp folder within it; or use 'systemctl show' and look for the PrivateTmp setting: PrivateTmp=yes

To fix this amend the Apache service definition using

sudo systemctl edit apache2.service

and add (to that empty file):

[Service]
PrivateTmp=false

then stop and start using systemctl:

sudo systemctl stop apache2
sudo systemctl start apache2

You should now see the Passenger folder directly in /tmp as passenger.instance and passenger-status will work again.

(answer found via https://www.pistolfly.com/weblog/en/2016/01/passenger-config-and-passenger-status-result-in-an-error-on-centos7.html)

Mike
  • 36
  • 2