2

I have a rails application that I am deploying on an aws ec2 instance, this is my first time using the Rubber Gem, for which I have followed this tutorial. After removing the default nginx configurations and after intial deployment (step 5 of the tutorial I have mentioned) when ever I try and access my app using the public IP or DNS I get a 403 Forbidden nginx screen. On inspecting the error log of nginx on the server this is what I found. I have been stuck on this issue for quite sometime now, any help would be greatly appreciated. Thanks.

tail -f /var/log/nginx/error.log
[ 2015-07-10 05:49:13.7236 13522/7fc24be3a780 age/Wat/Main.cpp:1264 ]: Starting PassengerAgent watchdog...
[ 2015-07-10 05:49:13.7526 13525/7f2f7f588780 age/Hel/Main.cpp:944 ]: Starting PassengerAgent server...
[ 2015-07-10 05:49:13.7529 13525/7f2f7f588780 age/Hel/Main.cpp:237 ]: PassengerAgent server running in multi-application mode.
[ 2015-07-10 05:49:13.7550 13525/7f2f7f588780 age/Hel/Main.cpp:698 ]: PassengerAgent server online, PID 13525
[ 2015-07-10 05:49:13.7851 13530/7f39b592e780 age/Log/Main.cpp:442 ]: Starting PassengerAgent logger...
[ 2015-07-10 05:49:13.7863 13530/7f39b592e780 age/Log/Main.cpp:323 ]: PassengerAgent logger online, PID 13530
[ 2015-07-10 05:49:13.7876 13525/7f2f7f588780 age/Hel/Main.cpp:857 ]: Watchdog seems to be killed; forcing shutdown of all subprocesses

[ 2015-07-10 05:49:13.7877 13525/7f2f79042700 age/Hel/Main.cpp:508 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
2015/07/10 05:49:13 [alert] 9729#0: Required key 'core_address' is missing (-1: Unknown error)
Zaeem Asif
  • 21
  • 1
  • 4

1 Answers1

-1

Passenger author here. This error occurs when the Passenger module compiled inside Nginx, does not match the actual Passenger version that is installed. In other words, your installation is broken.

I recommend that you start over completely, on a new and empty server, using the Passenger official walkthrough documentation.

Hongli
  • 18,682
  • 15
  • 79
  • 107
  • actually this answer here on server fault worked for me, a change in version and my app on my instance is up and running http://serverfault.com/questions/704866/passenger-agent-signal-received-gracefully-shutting-down/705253#705253 – Zaeem Asif Jul 15 '15 at 04:45
  • any idea how can I deploy it in production using the link you provided??? I am deploying again following your link and when it comes to create a db its creating the development and test dbs and not the production db, I have added the secret key base as well. – Zaeem Asif Jul 19 '15 at 09:22
  • Try `bundle exec rake db:migrate RAILS_ENV=production` – Hongli Jul 19 '15 at 22:04
  • with a little more googling I found a link to deploy in production using capistrano, I have deployed the app but when I try and access it I get this error in the nginx logs (403 error): "directory index of "/current/" is forbidden....." – Zaeem Asif Jul 19 '15 at 22:09