While I am deploying the rails application via capistrano on my CentOS server, I get this error all the time:
*** ERROR: Phusion Passenger does not seem to work. If you are sure that it works, then the cause of this problem may be from:
- You have configured the instance registry directory using the Apache option PassengerInstanceRegistryDir, Nginx's parameter "passenger_install_register_dir" or "Standalone" Command-line argument -instance-registry-dir. If so, set the environment variable PASSENGER_INSTANCE_REGISTRY_DIR to this directory and run this command again.
- The instance directory is removed from the operating system. Specify a different instance registry directory using Apache. The PassengerInstanceRegistryDir, Nginx, user_instance_registry_dir option or the Phusion Passenger offline mode is the instance-registry-dir line command.
On my server I have an apache and a passenger 5.0.30 First, I looked at the other answers here on the stack: Link to one of these topics . Unfortunately, nothing helped me. I also tried setting the env settings and other parameters from apache conf. Any idea what I should change to deploy my rails application? Where is the full path to the first passenger status in PATH? Does this match with the passenger? Below are my logs:
$ 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 there are multiple Apache installations... Only a > single installation detected. This is good. > > ------------------------------------------------------------------------- > > * Checking whether this Passenger install is in PATH... ✓ * Checking > whether there are no other Passenger installations... ✓ * Checking > whether Apache is installed... ✓ * Checking whether the Passenger > module is correctly configured in Apache... ✓ > > Everything looks good. :-) $ rvmsudo passenger-memory-stats Version: 5.0.30 Date : 2016-11-15 13:43:44 +0100 ---------- Apache processes ---------- PID PPID VMSize Private Name -------------------------------------- 25188 1 476.6 MB 1.5 MB /usr/sbin/httpd -DFOREGROUND 25220 25188 270.4 MB 0.5 MB /usr/sbin/httpd -DFOREGROUND 25246 25188 478.6 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND 25247 25188 478.6 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND 25248 25188 478.6 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND 25249 25188 478.6 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND 25250 25188 478.6 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND ### Processes: 7 ### Total private dirty RSS: 3.08 MB -------- Nginx processes -------- ### Processes: 0 ### Total private dirty RSS: 0.00 MB ----- Passenger processes ----- PID VMSize Private Name ------------------------------- 25222 421.0 MB 0.9 MB Passenger watchdog 25225 772.6 MB 1.5 MB Passenger core 25234 431.3 MB 1.0 MB Passenger ust-router ### Processes: 3 ### Total private dirty RSS: 3.39 MB
My apache config file:
<VirtualHost *:80> ServerName www.app.com ServerAdmin admin DocumentRoot "/srv/www/app_name/current/public" LoadModule passenger_module /home/userr/.rvm/gems/ruby-2.2.5/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so #<IfModule mod_passenger.c> # PassengerRuby /usr/local/rvm/gems/ruby-2.2.5 # PassengerRoot /usr/local/rvm/gems/ruby-2.2.5/gems/passenger-5.0.30 # PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.2.5/wrappers/ruby # PassengerInstanceRegistryDir /tmp #</IfModule> <IfModule mod_passenger.c> PassengerRoot /home/userr/.rvm/gems/ruby-2.2.5/gems/passenger-5.0.30 PassengerDefaultRuby /home/userr/.rvm/gems/ruby-2.2.5/wrappers/ruby PassengerInstanceRegistryDir /tmp </IfModule> Options -Indexes -FollowSymLinks -MultiViews LogLevel warn ErrorLog logs/www.app.com-error.log TransferLog logs/www.app.com-access.log CustomLog logs/www.app.cp,.log combined <Directory /srv/www/app_name/current/public> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require all granted </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from All </IfModule> </Directory> </VirtualHost>
And my env path:
env file: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin LOGNAME=root USER=root USERNAME=root HOME=/root SUDO_COMMAND=/bin/env PASSENGER_INSTANCE_REGISTRY_DIR=/tmp SUDO_USER=userr SUDO_UID=1001 SUDO_GID=100 PASSENGER_INSTANCE_REGISTRY_DIR=/tmp
Of course I'm doing something wrong. Thanks for every tip.
ruby-on-rails apache centos7 passenger
Panczo
source share