Error 502 Bad Gateway on NGINX + rails + dokku

痞子三分冷 提交于 2019-12-22 10:53:03

问题


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?


回答1:


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




回答2:


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




回答3:


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!



来源:https://stackoverflow.com/questions/21056911/error-502-bad-gateway-on-nginx-rails-dokku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!