passenger_instance_registry_dir not found

741 views
Skip to first unread message

Manjurul Islam

unread,
Nov 19, 2015, 9:38:28 PM11/19/15
to Phusion Passenger Discussions
I have been assigned a job to manage a server, it has Phusion Passenger install with NGINX and Ruby. Other features installed are Postgres, Redis and MongoDB.

The problem I am facing is, I cannot view "passenger-status", it is giving error like below:

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.

But "passenger-config validate install" gives


 passenger-config validate-install
What would you like to validate?
Use <space> to select.
If the menu doesn't display correctly, press '!'

 ‣ ⬢  Passenger itself
   ⬡  Apache

-------------------------------------------------------------------------

 * Checking whether this Passenger install is in PATH... ✓
 * Checking whether there are no other Passenger installations... ✓

Everything looks good. :-)


 even I cannot find a place where this string is available "PASSENGER_INSTANCE_REGISTRY_DIR", tried "grep -r PASSENGER_INSTANCE_REGISTRY_DIR / 2> /dev/null" which returned only this result below:

Binary file /run/log/journal/2d406ad2c45e4e1b86f11fa56e394d32/system.journal matches

Another big problem is passenger-memory-stats gives ? at private memory.

There is only one version of passenger is installed, so no question on version mismatched. it is version 5.0.15.

there is random directory here /tmp/passenger.(random string) which is an example of an instance directory. This changes indeed with every startup (because it is specific to an instance).

I need to fix it, any help?

Daniel Knoppel

unread,
Nov 20, 2015, 2:31:56 PM11/20/15
to Phusion Passenger Discussions
If possible you should definitely upgrade to passenger 5.0.21. It also has some improvements in install validation.

Since you have Passenger + Apache, according to the error message you should check your apache config file if there is a special setting for the "PassengerInstanceRegistryDir" option. If that's not there, or already set to /tmp then perhaps the permission on the files is such that the user you are running passenger-status from can't read them?

Did you try passenger-memory-stats with sudo?

- Daniel

Manjurul Islam

unread,
Nov 20, 2015, 2:55:24 PM11/20/15
to Phusion Passenger Discussions
Yes, I have tried using sudo too, private memory still showing "?" mark. And my stack is not Apache, it is using NGINX.

I tried using su, it gives the below result:

su passenger-memory-stats
su: user passenger-memory-stats does not exist

Is there anyway to fix this without updating the passenger? And if I update passenger, will it retain my existing configuration and everything, including my application, mail Rails and NGINX configuration?

-Regards
-Abdullah

Hongli Lai

unread,
Nov 20, 2015, 3:20:51 PM11/20/15
to phusion-passenger
On Fri, Nov 20, 2015 at 8:55 PM, Manjurul Islam
<digitalr...@gmail.com> wrote:
> Yes, I have tried using sudo too, private memory still showing "?" mark. And
> my stack is not Apache, it is using NGINX.

What Linux distribution and version are you using? Maybe something on
your system is preventing passenger-memory-stats from measuring
private memory.


> I tried using su, it gives the below result:
>
>> su passenger-memory-stats
>> su: user passenger-memory-stats does not exist

When using su (not sudo), you are supposed to pass the command via -c,
like this: su -c passenger-memory-stats


> Is there anyway to fix this without updating the passenger? And if I update
> passenger, will it retain my existing configuration and everything,
> including my application, mail Rails and NGINX configuration?

We don't yet know what's causing your problem, but it's possible that
this is just a bug that has already been fixed in the latest version.
Don't worry: if you update Passenger, you will retain everything
including your configuration, application, etc.

--
Phusion B.V. | Web Application deployment, scaling, and monitoring solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 63501007 (The Netherlands)

Manjurul Islam

unread,
Nov 20, 2015, 3:48:24 PM11/20/15
to Phusion Passenger Discussions, hon...@phusion.nl
I am using the below:

CentOS Linux release 7.1.1503 (Core)
kernel: 3.14.32-xxxx-grs-ipv6-64

and did su -c, here is the output

su -c passenger-memory-stats
Version: 5.0.15
Date   : 2015-11-20 15:43:37 -0500
------------- Apache processes -------------
*** WARNING: The Apache executable cannot be found.
Please set the APXS2 environment variable to your 'apxs2' executable's filename, or set the HTTPD environment variable to your 'httpd' or 'apache2' executable's filename.


--------- Nginx processes ---------
PID   PPID  
VMSize   Private  Name
-----------------------------------
9671  1     58.0 MB  ?        nginx: master process /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf
9673  9671  60.2 MB  ?        nginx: worker process
9674  9671  60.1 MB  ?        nginx: worker process
### Processes: 3
### Total private dirty RSS: 0.00 MB (?)


----- Passenger processes ------
PID    
VMSize     Private  Name
--------------------------------
9626   420.2 MB   ?        Passenger watchdog
9629   3685.7 MB  ?        Passenger core
9638   291.8 MB   ?        Passenger ust-router
9809   457.4 MB   ?        Passenger RubyApp: /opt/www/abcdef/public
9874   446.6 MB   ?        Passenger RubyApp: /opt/web/advic.net/public (production)
9938   670.1 MB   ?        Passenger RubyApp: /opt/web/gtt/public (production)
11399  442.4 MB   ?        Passenger RubyApp: /opt/web/advice.net/public (production)
11447  457.3 MB   ?        Passenger RubyApp: /opt/www/abcdef/public
11721  582.4 MB   ?        Passenger RubyApp: /opt/web/gtt/public (production)
11769  582.4 MB   ?        Passenger RubyApp: /opt/web/gtt/public (production)
11778  582.5 MB   ?        Passenger RubyApp: /opt/web/gtt/public (production)
22771  439.7 MB   ?        Passenger RubyApp: /opt/web/advice.com/public (production)
23568  437.2 MB   ?        Passenger RubyApp: /opt/web/advice.com/public (production)
24499  433.7 MB   ?        Passenger RubyApp: /opt/web/advice.com/public (production)
25343  301.8 MB   ?        Passenger AppPreloader: /opt/web/advice.com
25370  433.7 MB   ?        Passenger RubyApp: /opt/web/advice.com/public (production)
### Processes: 16
### Total private dirty RSS: 0.00 MB (?)


All the server usually get Passenger, ruby, nginx deployed exactly in same manner, but only this server is having problem. Though other server has CentOS 6.7 (old one)

regards

Hongli Lai

unread,
Nov 20, 2015, 3:51:40 PM11/20/15
to Manjurul Islam, Phusion Passenger Discussions
On Fri, Nov 20, 2015 at 9:48 PM, Manjurul Islam
<digitalr...@gmail.com> wrote:
> I am using the below:
>
> CentOS Linux release 7.1.1503 (Core)
> kernel: 3.14.32-xxxx-grs-ipv6-64

Does the 'grs' indicate that your kernel is using grsec? If so then
you probably have some kind of security feature enabled that prevents
measuring private memory. Unfortunately I am not a grsec expert so I
cannot help you with that.

Abdullah

unread,
Nov 20, 2015, 4:46:56 PM11/20/15
to Hongli Lai, Phusion Passenger Discussions
Hi,

If I upgrade, you said it will retain all my config and settings, but do I need to manually edit nginx.conf to point the passenger_root to new version directory? Or everything will be fully automated? 

Regards
--


___________________
With Best Regards

Abdullah Mohammad Manjurul Islam
Cell: +880 1730 982562
Email: digitalr...@gmail.com ; islamm...@yahoo.com
Address: 958/1 Outer Circular Road, Rajarbagh, Dhaka-1217, Bangladesh

Cisco® CCNA
VMware® VCP6-DCV

Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

Hongli Lai

unread,
Nov 20, 2015, 4:51:21 PM11/20/15
to Abdullah, Phusion Passenger Discussions
On Fri, Nov 20, 2015 at 10:46 PM, Abdullah <digitalr...@gmail.com> wrote:
> Hi,
>
> If I upgrade, you said it will retain all my config and settings, but do I
> need to manually edit nginx.conf to point the passenger_root to new version
> directory? Or everything will be fully automated?

If you use Phusion's Debian or RPM packages, then you do not need to
edit nginx.conf to change passenger_root. Otherwise (e.g. if you
installed from source, or Homebrew, or RubyGems) then you do.

Abdullah

unread,
Nov 20, 2015, 4:53:52 PM11/20/15
to Hongli Lai, Phusion Passenger Discussions
I have this kind of directory

/usr/lib/ruby/gems/2.2.0/gems/passenger-5.0.15

so it means it is from RubyGems.
Reply all
Reply to author
Forward
0 new messages