rubber ec2 deployment重复默认安全组

时间:2014-06-25 06:04:21

标签: amazon-ec2 rubber

运行命令时出现此错误:cap rubber:create_staging

response_call': Duplicate => the specified rule \"peer: sg-86b557e9, TCP, from port: 1, to port: 65535, ALLOW\" already exists (Fog::Compute::AWS::Error) from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/response_parser.rb:26:in response_call'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:402:in response' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:272:in请求'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/idempotent.rb:12:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:292:in救援请求'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:229:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/idempotent.rb:12:in error_call'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:292:in rescue in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:229:in请求'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/idempotent.rb:12:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:292:in救援请求'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:229:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/xml/sax_parser_connection.rb:35:in请求'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/xml.rb:21:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/compute.rb:462:in _ request'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/compute.rb:457:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb:49:in authorize_security_group_ingress'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/models/compute/security_group.rb:102:in authorize_port_range' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:380:in add_security_group_rule&#39 ;     来自/home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:481:in block (2 levels) in sync_security_groups' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:476:in每个'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:476:in block in sync_security_groups' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:405:in每个'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:405:in sync_security_groups' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:260:in setup_security_groups'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:75:in before_create_instance' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/thread_safe_proxy.rb:13:in method_missing'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/recipes/rubber/instances.rb:267:in block in create_instance' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in mon_synchronize'     来自/home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/recipes/rubber/instances.rb:266:in create_instance' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/recipes/rubber/instances.rb:230:in块(2级)在create_instances'

1 个答案:

答案 0 :(得分:0)

我刚刚找到了解决方法,虽然我不确定它有多安全。

我进入了我的实例并编辑了默认组。除了最基本的规则之外,我删除了所有入站规则。然后我向任何人开放了这个:

screenshot

这似乎解决了这个问题。

更新:这已修改为recent commit至Rubber。我目前指的是github回购,但你也可以等待2.10.1出来。