Puma と Nginx を実行する AWS Elastic Beanstalk を使用した Rails アプリ 502

Puma と Nginx を実行する AWS Elastic Beanstalk を使用した Rails アプリ 502

Passenger を使って Beanstalk 上でアプリケーションを正常に実行できましたが、Puma ではうまくいきませんでした。Puma スタックにデプロイするたびに 502 エラーが発生し、ログ ファイルには sock ファイルが見つからないことが示されます。

2014/05/15 21:00:15 [crit] 1684#0: *4 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 10.184.156.117, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/", host: "app-env-89spnxpcai.elasticbeanstalk.com"

私のアプリはRuby 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 で動作させるには何か特別なことが必要ですか?

答え1

この問題は、最新バージョン(Ruby 2.0(Puma)を実行している64ビットAmazon Linux 2014.03 v1.0.5)では発生しません。

答え2

に変更するconfig.force_ssl = truefalse問題は解決しました

関連情報