Rails Elastic Beanstalk 连接超时 - puma 服务器

Posted

技术标签:

【中文标题】Rails Elastic Beanstalk 连接超时 - puma 服务器【英文标题】:Rails Elastic Beanstalk connection time out - puma server 【发布时间】:2016-09-25 03:12:38 【问题描述】:

我已经在网络和 *** 上进行了搜索,但无法做到这一点。

我有一个 rails 应用程序并部署到弹性 beanstalk。健康状况良好且呈绿色,但网址无效。稍等片刻,页面显示连接超时。

当我输入eb open 报错;

ERROR: OSError :: [Errno 10] No child processes

无法弄清楚为什么会这样。

当我eb deploy

INFO: Environment update is starting.                               
INFO: Deploying new version to instance(s).                         
INFO: Environment health has transitioned from Ok to Info. Application update in progress on 1 instance. 0 out of 1 instance completed (running for 4 seconds).
INFO: New application version was deployed to running EC2 instances.
INFO: Environment update completed successfully.   

负载平衡器可能有问题吗?在哪里可以查看我的数据库是否已创建/迁移?

这是我看到的错误消息:

宝石文件;

source 'https://rubygems.org'

gem 'rails',                '4.2.0'
gem 'json',             '~> 1.8.2'
gem 'bcrypt',               '3.1.7'
gem 'will_paginate',           '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'


gem 'carrierwave'
gem 'rmagick'
gem 'fog-aws'
#gem 'bootstrap-sass',       '3.2.0.0'
gem 'sass-rails',           '5.0.2'    #it is added to new Rails applications by default.


gem 'dropzonejs-rails'
gem 'figaro'

gem 'uglifier',             '2.5.3'
gem 'coffee-rails',         '4.1.0'
gem 'jquery-rails',         '4.0.3'
#gem 'jquery-ui-rails'
#//= require turbolinks TO ASSETS gem 'turbolinks',           '2.3.0'
gem 'jbuilder',             '2.2.3'
gem 'sdoc',                 '0.4.0', group: :doc

gem 'wicked'
gem 'geocoder'
gem "mailboxer"
gem 'toastr-rails'

#gem "select2-rails"
gem 'jquery-cookie-rails'



group :development, :test do
  gem 'sqlite3',     '1.3.9'
  gem 'byebug',      '3.4.0'
  gem 'web-console', '2.0.0.beta3'
  gem 'spring',      '1.1.3'
end

group :test do
  gem 'minitest-reporters', '1.0.5'
  gem 'mini_backtrace',     '0.1.3'
  gem 'guard-minitest',     '2.3.1'
end

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'
  gem 'puma'
end

【问题讨论】:

您的 EC2 实例是否正在运行? 您的数据库是否已创建/迁移? 【参考方案1】:

config.force_ssl = true 更改为 false 已为我修复了此问题

【讨论】:

以上是关于Rails Elastic Beanstalk 连接超时 - puma 服务器的主要内容,如果未能解决你的问题,请参考以下文章

无法连接到 Elastic Beanstalk 上的 ActionCable

Rails + Elastic Beanstalk + Passenger:更改乘客配置

Elastic beanstalk [Rails] 部署问题 - 无法分配内存

AWS Elastic Beanstalk——rails 部署问题

Rails 4 Elastic Beanstalk 部署错误

Rails 4.1 Elastic Beanstalk 找不到图片网址