13

I got error like Phusion Passenger is currently not serving any applications. while trying to restart passenger with passenger-config restart-app command.

I googled but most of the answers were only related with deployment.

I want to restart passenger in the development environment as I am using vhost. PS. My web server is nginx.

Raaz
  • 1,669
  • 2
  • 24
  • 48
  • 1
    Did your (re-)start your app with `touch app-directory/current/tmp/restart.txt`? – sugaryourcoffee Oct 18 '15 at 17:18
  • @sugaryourcoffee, yes I have, but it is also not restarting my app. – Raaz Oct 19 '15 at 02:31
  • 1
    What does `passenger-config validate-install` and `passenger-status` say? – sugaryourcoffee Oct 19 '15 at 04:46
  • @sugaryourcoffee, can u turn your comment into answer. – Raaz Oct 21 '15 at 12:32
  • do you need more information or what do you mean with 'turn comment into an answer' – sugaryourcoffee Oct 21 '15 at 17:25
  • @sugaryourcoffee, no , your comment worked fine. I made a mistake with restart.txt name. – Raaz Oct 22 '15 at 01:59
  • 1
    @sugaryourcoffee You made a good comment wich turn out to resolves his problem. He wants you to answer through the answer box so he van check the problem as resolved with your answer. – gdurelle Feb 22 '16 at 16:01
  • Has anyone found a solution for this as yet? I have my application running with passenger [here](http://clashere.com:3000) but when I run `passenger-status ` I get **Phusion Passenger is currently not serving any applications**. – Andrew Lobban Apr 26 '16 at 23:52
  • Additionally, when I run my node app like this in passenger: `passenger start --app-type node --startup-file myapp.js` I can see my that my app is being served, but `passenger-status` still says that it's not serving my application. – Andrew Lobban Apr 27 '16 at 00:57

2 Answers2

11

See my comment here.

You need to explicitly specify, where actual Ruby code of a Rails application is located, using passenger_app_root directive, described in Passenger's documentaion.

Without this directive, Passenger will thinck, that actual Ruby code is located in path, specified with root nginx-directive.

Example of a correct configuration file '/etc/nginx/sites-available/app_name':

server {
  listen 80;

  server_name 188.225.35.216;
  passenger_enabled on;
  rails_env    production;
  root         /path/to/your/app/public/folder;
  passenger_app_root /path/to/your/app/code; # <<< Point Passenger to application code

  # redirect server error pages to the static page /50x.html
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root   html;
  }
}

In my case, Passenger was't serving my Rails app, that was deployed with Capistrano. I had have to specify a value for passenger_app_root like following /var/www/my_app/current.

This will point Passenger exactly, where application code is presented.

AntonAL
  • 16,692
  • 21
  • 80
  • 114
4

I am betting your passenger is running.
If you look at step 3, it hints at what I am talking about.

https://www.phusionpassenger.com/library/install/nginx/install/oss/trusty/

Nginx will take care of passenger for you if it's set up to do that. Can you try the command in that tutorial and look for passenger processes too ?

sudo /usr/sbin/passenger-memory-stats

Good luck!

Mostafiz
  • 7,243
  • 3
  • 28
  • 42
Adam
  • 344
  • 1
  • 15