Elastic Beanstalk上的502错误的网关Nginx + PUMA + Rails 3.2 [英] 502 bad gateway nginx + puma + rails 3.2 on Elastic Beanstalk
问题描述
部署成功,一切都变成绿色.但是,当我们尝试访问应用程序URL时,它会显示502 Bad Gateway
错误.
The deployment was successful and everything is green. But when we try to access the application URL, it gives 502 Bad Gateway
error.
使用ps -aux | grep puma
检查puma进程不会返回任何附加到puma服务器的进程,但是pgrep
返回以下内容.
Checking for puma process with ps -aux | grep puma
doesn't return any process attached to puma server but pgrep
returns following.
$pgrep -fl puma
18009 su -s /bin/bash -c bundle exec puma -C /opt/elasticbeanstalk/support/conf/pumaconf.rb webapp
18031 ruby /opt/rubies/ruby-2.0.0-p598/bin/puma -C /opt/elasticbeanstalk/support/conf/pumaconf.rb
推荐答案
我无法解决此问题.同样,我们应该只使用免费的EC2实例代替BeanStalk.
I could not fix this problem. Also we supposed to use EC2 free instance only instead of BeanStalk.
我们现在已移至具有RDS的Free EC2实例,并通过Capistrano和Nginx + Unicorn部署了rails应用程序.虽然不容易 [ 1] [2] ,但最后我们使它起作用.
We have now moved to Free EC2 instance with RDS and deployed the rails application using Capistrano with Nginx + Unicorn. Though it was not easy[1][2] but finally we got it working.
这篇关于Elastic Beanstalk上的502错误的网关Nginx + PUMA + Rails 3.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!