Error 502 Bad Gateway on NGINX + rails + dokku

2019-05-14 10:52发布

I am receiving an Error 502 after deploying my Ruby on Rails app to a Dokku droplet on Digital Ocean. The app builds and deploys to Heroku just fine, as well as locally.

Checking the NGINX logs, I see the following:

2014/01/10 01:56:32 [error] 2376#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <my.ip.add.ress>, server: app.campbellscoop.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:49153/", host: "app.campbellscoop.com"

What could be causing this error?

3条回答
甜甜的少女心
2楼-- · 2019-05-14 11:03

You can check the errors by running dokku logs appname in the ssh.

查看更多
放我归山
3楼-- · 2019-05-14 11:23

i think it's problem in restarting mod_passenger (nginx module for ruby)

查看更多
爷、活的狠高调
4楼-- · 2019-05-14 11:24

I had a similar issue after powering off my Dokku droplet on Digital Ocean. Easy fix was to ssh into the droplet and run:

dokku ps:rebuildall

Visit the app in the browser and all was well!

查看更多
登录 后发表回答