Huginn
Huginn

Reputation: 240

502 Bad Gateway Nginx/1.4.6 Ubuntu

Apologies, but I have nearly zero understanding of Ruby so I may be a touch slow on replies as I look up things in responses.

Anywho, I have a site that I'm helping make updates for built with Ruby Puma on AWS. I spoke to the original DEV about how to publish (nice gentleman over in India so we're on a 12 hour delay) to which he gave me the following instructions:

  1. Please make the image/html changes in the required files.
  2. Then run the command - RAILS_ENV=production rake assets:precompile
  3. Then to kill the running puma process please use these commands - ps aux | grep puma kill -9 1025(puma process number)
  4. Then to restart the server use this command - bundle exec puma -C config/puma.rb

I went ahead and ran his step-by-step process through my ssh access, however, it resulted in a 502 Bad Gateway nginx/1.4.6 (Ubuntu)

I'm hesitant to go kicking around and trying other solutions since I don't fully understand his setup, but I hate leaving a site in a 502. Anyone have any idea why the step-by-step caused such a response?

Upvotes: 0

Views: 726

Answers (2)

Huginn
Huginn

Reputation: 240

Turns out the dev didn't specify the correct folder for me to run the Ruby update inside of. Once he highlighted the correct folder everything updated as expected.

Upvotes: 0

David Grayson
David Grayson

Reputation: 87531

In general, this error means that nginx is configured to act as an HTTP proxy and the server you are proxying to (probably the Rails app) is not functioning enough to give any kind of response. You should try accessing your Rails app directly if possible (instead of going through nginx) to see if you can get more information about the error. You should try looking in the Rails error logs.

Upvotes: 1

Related Questions