Ruby on rails 4 Rails app 502配备AWS弹性豆茎跑步Puma&;Nginx
我已经能够成功地让我的应用程序运行在Beanstalk和Passenger上,但是我在Puma上没有运气。每当我部署到Puma堆栈时,都会出现502错误,我的日志文件表明它找不到Puma sock文件:Ruby on rails 4 Rails app 502配备AWS弹性豆茎跑步Puma&;Nginx,ruby-on-rails-4,amazon-web-services,nginx,amazon-elastic-beanstalk,puma,Ruby On Rails 4,Amazon Web Services,Nginx,Amazon Elastic Beanstalk,Puma,我已经能够成功地让我的应用程序运行在Beanstalk和Passenger上,但是我在Puma上没有运气。每当我部署到Puma堆栈时,都会出现502错误,我的日志文件表明它找不到Puma sock文件: 2014/05/15 21:00:15[crit]1684#0:*4连接()到unix:///var/run/puma/my_app.sock 连接到上游时失败(2:没有此类文件或目录),客户端:10.184.156.117,服务器:\请求:“GET/HTTP/1.1”,上游:http://un
2014/05/15 21:00:15[crit]1684#0:*4连接()到unix:///var/run/puma/my_app.sock 连接到上游时失败(2:没有此类文件或目录),客户端:10.184.156.117,服务器:\请求:“GET/HTTP/1.1”,上游:http://unix:///var/run/puma/my_app.sock:/,主机:“app-env-89spnxpcai.elasticbeanstalk.com”
我的应用程序是使用Ruby 2.0.0p451和Rails 4.1.1构建的
我的.ebextensions配置如下所示
packages:
yum:
git: []
commands:
add_bundle_exec:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: perl -pi -e 's/(rake)/bundle exec $1/' 11_asset_compilation.sh 12_db_migration.sh
add_deployment_flag:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: perl -pi -e 's/(bundle install)/$1 --deployment/' 10_bundle_install.sh
make_vendor_bundle_dir:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
command: mkdir /var/app/support/vendor_bundle
set_vendor_bundle_var:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/support
command: sed -i '12iexport EB_CONFIG_APP_VENDOR_BUNDLE=$EB_CONFIG_APP_SUPPORT/vendor_bundle' envvars
symlink_vendor_bundle:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: sed -i 's/\(^cd $EB_CONFIG_APP_ONDECK\)/\1\nln -s $EB_CONFIG_APP_VENDOR_BUNDLE .\/vendor\/bundle/' 10_bundle_install.sh
z_write_post_provisioning_complete_file:
cwd: /opt/elasticbeanstalk/support
command: touch .post-provisioning-complete
我做错了什么,我需要一些特别的东西才能让它与Puma一起工作吗?这个问题并没有出现在最新版本上——64位的Amazon Linux 2014.03 v1.0.5运行Ruby 2.0(Puma)我有完全相同的问题,从那以后你找到解决方案了吗?更新到最新版本的AMI为我解决了它。是吗“64位Amazon Linux 2015.03 v2.0.1运行Ruby 2.2(Puma)”?如果是,我已经在使用此版本,但问题仍然存在。那么您的ebextensions可能存在问题,请查看这些版本。它们不是100%最新的,但它们会为您指出正确的方向,这显然是正常的:”由于Elastic Beanstalk使用的是一个直接升级过程,因此可能会有几秒钟的停机时间。“现在没有解决办法。”这太糟糕了。