On Mon, 28 Nov 2016 07:40:10 +0000 Matijs van Zuijlen <mat...@matijs.net> wrote:
I have just upgraded to passenger 5, and now I want to restart my
application the 'new' way by using passenger-config. I have tried this
both through capistrano, and on the command line, and I get the
following error message:

   *** 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 one of:

I just upgraded our Redmine installation to Debian stretch, and I have the same issue. I believe this is caused by the PrivateTmp feature of systemd (PrivateTmp=true is set in /lib/systemd/system/apache2.service), because while passenger-status is looking in /tmp, Apache is storing the instance registry dir in /tmp/systemd-private-...:

redmine.iserv.eu ~ # ll /tmp/systemd-private-df0217594fc94127b16c17b45a99716c-apache2.service-Q1WevN/tmp
total 72K
drwxr-xr-x 3 www-data www-data 4.0K Aug 15 18:49 bundler/
drwxr-xr-x 4 root     root     4.0K Aug 15 18:49 passenger.U9uCrRI/
-rw------- 1 www-data www-data 0 Aug 15 18:52 RackMultipart20170815-1192-8063mg -rw------- 1 www-data www-data 0 Aug 15 18:56 RackMultipart20170815-1192-8qsxi -rw------- 1 www-data www-data 0 Aug 15 18:53 RackMultipart20170815-1192-v5lfb6
-rw------- 1 root     root      30K Aug 15 18:56 passenger-error-24wMBJ.html
-rw------- 1 root     root      30K Aug 15 18:49 passenger-error-GwQoka.html

I have resolved this as follows:

1) Create /etc/systemd/system/apache2.service.d/passenger-instance-reg.conf with the following contents:

[Service]
ExecStartPre=/bin/mkdir -p /run/passenger
ExecStopPost=/bin/rmdir --ignore-fail-on-non-empty /run/passenger

2) systemctl daemon-reload

3) Add the following to your Apache configuration:

# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846052
PassengerInstanceRegistryDir /run/passenger

4) Add the following to your /etc/environment:

# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846052
PASSENGER_INSTANCE_REGISTRY_DIR=/run/passenger

5) restart Apache and reconnect (SSH) or re-login (local). Opening a new shell is not enough, because /etc/environment is only read by PAM. passenger-status should work now.

--
Mit freundlichen Grüßen
Martin v. Wittich

IServ GmbH
Bültenweg 73
38106 Braunschweig

Telefon:   0531-2243666-0
Fax:       0531-2243666-9
E-Mail:    i...@iserv.eu
Internet:  iserv.eu

USt-IdNr. DE265149425 | Amtsgericht Braunschweig | HRB 201822
Geschäftsführer: Benjamin Heindl, Jörg Ludwig

Reply via email to