错误502 NGINX + rails + dokku上的错误网关 [英] Error 502 Bad Gateway on NGINX + rails + dokku

查看:146
本文介绍了错误502 NGINX + rails + dokku上的错误网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将我的Ruby on Rails应用程序部署到数字海洋上的Dokku液滴后,我收到了错误502。该应用程序可以在Heroku和本地构建和部署。

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.

检查NGINX日志,我看到以下内容:

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?

推荐答案

在数字海洋上关闭我的Dokku液滴后,我遇到了类似的问题。
轻松修复是将ssh放入液滴并运行:

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!

这篇关于错误502 NGINX + rails + dokku上的错误网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆