在create_staging期间将Rails应用程序部署到EC2时的Mongo :: ConnectionFailure

时间:2013-03-18 02:52:28

标签: ruby-on-rails mongodb amazon-ec2 rubber

我正在尝试使用Rubber将我的第一个应用程序部署到amazon ec2。我已经尝试了几次,每次使用Mongo :: Connection Failure时进程出错。我已经尝试了几个不同的实例类型,但我仍然得到相同的错误。只是不知道如何继续。

以下是错误日志:

 ** [out :: production.foo.com] /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongo-1.3.1/lib/mongo/connection.rb:518:in `connect'
 ** [out :: production.foo.com] :
 ** [out :: production.foo.com] Failed to connect to a master node at production.foo.com:27017
 ** [out :: production.foo.com] (
 ** [out :: production.foo.com] Mongo::ConnectionFailure
 ** [out :: production.foo.com] )
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongo-1.3.1/lib/mongo/connection.rb:656:in `setup'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongo-1.3.1/lib/mongo/connection.rb:101:in `initialize'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongo-1.3.1/lib/mongo/connection.rb:152:in `new'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongo-1.3.1/lib/mongo/connection.rb:152:in `from_uri'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/config/database.rb:89:in `master'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/config/database.rb:22:in `configure'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/config.rb:273:in `configure_databases'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/config.rb:94:in `from_hash'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/config.rb:109:in `block in load!'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/config.rb:108:in `tap'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/config.rb:108:in `load!'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid.rb:147:in `load!'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/mongoid-2.4.5/lib/mongoid/railtie.rb:84:in `block in <class:Railtie>'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
 ** [out :: production.foo.com] from /usr/local/graylog2-web-interface-0.9.6p1/config/environment.rb:6:in `<top (required)>'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands/runner.rb:40:in `<top (required)>'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:63:in `require'
 ** [out :: production.foo.com] from /usr/local/rubies/1.9.3-p392/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:63:in `<top (required)>'
 ** [out :: production.foo.com] from ./script/rails:6:in `require'
 ** [out :: production.foo.com] from ./script/rails:6:in `<main>'
    command finished in 66584ms
failed: "/bin/bash -l -c 'sudo -p '\\''sudo password: '\\''  bash -l /tmp/bootstrap_graylog_web'" on production.foo.com

1 个答案:

答案 0 :(得分:0)

我有完全相同的问题,而且说实话,我只是再次运行'cap rubber:bootstrap',出于某种原因,这解决了它......