0

I have my ruby on rails application installed in the path /var/www/sugnc

My linux user name is usersugnc, so I have a passenger configuration file with the same name in the path /etc/httpd/conf.d/usersugnc.conf

The content of that file is

<VirtualHost *:80>
    RackEnv production
    RailsEnv production
    ServerName Nombredelservidor

    DocumentRoot /var/www/sugnc/public

    PassengerUser usersugnc
    PassengerDisableAnonymousTelemetry on
    PassengerInstanceRegistryDir /var/run/passenger-instreg
    PassengerRoot /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini
    PassengerRuby /usr/local/rvm/gems/ruby-2.5.1/wrappers/ruby

    <Directory /var/www/sugnc/public>
       Allow from all
       Options -MultiViews
       # si apache es >= 2.4   (sudo httpd -v)
       Require all granted
    </Directory>
 </VirtualHost>

When I restart apache all is ok. But passenger does not find or serves my application. When I run passenger-status I get this:

Version : 6.0.7
Date    : 2020-12-06 12:32:23 +0000
Instance: zFQDHZbP (Apache/2.4.6 (CentOS) Phusion_Passenger/6.0.7)

Phusion Passenger is currently not serving any applications.

And when I run sudo tail -f /var/log/httpd/error_log I get

[Sun Dec 06 12:32:16.014559 2020] [lbmethod_heartbeat:notice] [pid 23285] AH02282: No slotmem from mod_heartmonitor
[ N 2020-12-06 12:32:16.0297 23290/T1 age/Cor/CoreMain.cpp:1325 ]: Passenger core shutdown finished
[ N 2020-12-06 12:32:16.0389 23310/T1 age/Wat/WatchdogMain.cpp:1373 ]: Starting Passenger watchdog...
[ N 2020-12-06 12:32:16.0647 23317/T1 age/Cor/CoreMain.cpp:1340 ]: Starting Passenger core...
[ N 2020-12-06 12:32:16.0648 23317/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.

[ N 2020-12-06 12:32:16.0727 23317/T1 age/Cor/CoreMain.cpp:1015 ]: Passenger core online, PID 23317
[Sun Dec 06 12:32:16.078759 2020] [mpm_prefork:notice] [pid 23285] AH00163: Apache/2.4.6 (CentOS) Phusion_Passenger/6.0.7 configured -- resuming normal operations
[Sun Dec 06 12:32:16.078796 2020] [core:notice] [pid 23285] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[ N 2020-12-06 12:32:18.5868 23317/T5 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)

And this is the output when I run passenger-memory-stats

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Version: 6.0.7
Date   : 2020-12-06 12:39:57 +0000

---------- Apache processes ----------
PID    PPID   VMSize    Private  Name
--------------------------------------
23285  1      289.5 MB  ?        /usr/sbin/httpd -DFOREGROUND
23331  23285  291.5 MB  ?        /usr/sbin/httpd -DFOREGROUND
23332  23285  291.5 MB  ?        /usr/sbin/httpd -DFOREGROUND
23333  23285  291.5 MB  ?        /usr/sbin/httpd -DFOREGROUND
23334  23285  291.5 MB  ?        /usr/sbin/httpd -DFOREGROUND
23335  23285  291.5 MB  ?        /usr/sbin/httpd -DFOREGROUND
### Processes: 6
### Total private dirty RSS: 0.00 MB (?)


-------- Nginx processes --------

### Processes: 0
### Total private dirty RSS: 0.00 MB


----- Passenger processes -----
PID    VMSize    Private  Name
-------------------------------
23310  355.1 MB  ?        Passenger watchdog
23317  923.6 MB  ?        Passenger core
### Processes: 2
### Total private dirty RSS: 0.00 MB (?)
*** WARNING: Please run this tool with rvmsudo. Otherwise the private dirty RSS (a reliable metric for real memory usage) of processes cannot be determined.

What am I missing? What needs to be done?

  • Your passenger root looks weird, and are you using rvm on that machine? Did you get your values from "passenger-config --ruby-command"? – Jad Dec 06 '20 at 18:43
  • passenger-config --root command displays: /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini – fjdeveloper Dec 06 '20 at 19:25
  • And the ruby command version? – Jad Dec 07 '20 at 16:25
  • To use in Apache: PassengerRuby /usr/local/rvm/gems/ruby-2.5.1/wrappers/ruby – fjdeveloper Dec 07 '20 at 17:10
  • I have installed nginx and it has the same behaviour. Passenger and Nginx are working but passenger does not find my ror application – fjdeveloper Dec 07 '20 at 17:13
  • Maybe it has something to do with [this](https://www.phusionpassenger.com/library/deploy/nginx/user_sandboxing.html#finding_out_app_user) ?? – fjdeveloper Dec 07 '20 at 17:15
  • also, I know this is silly, but the `passenger-status` won't show any applications until you've tried to access the application. you have tried to access the application? – Jad Dec 08 '20 at 10:17
  • Yes, I have tried. I get the error page of Nginx in the case of Passenger and Nginx: "the page you are looking for is not found" – fjdeveloper Dec 08 '20 at 11:57
  • hmm ... it's not something small like including `PassengerEnabled on` in your "Directory" object? – Jad Dec 09 '20 at 10:19
  • I have made it work with the root user (without PassengerEnabled on). I think all has to do with permissions and rvm tool. Thank you @jad for your help. – fjdeveloper Dec 09 '20 at 19:49
  • no problems. in production, do try to install the "rvm" as the user you want to run the system as, assuming you're using rvm and passenger on the production server – Jad Dec 10 '20 at 13:04

0 Answers0