title: Rubber stuck on deployment to ec2 (sftp upload #<StringIO:0x000001029984c0> -> /tmp/setup_remote_aliases)
body: <p>I am using rubber (built on top of capistrano) to deploy to my ec2 instance. I basically followed the rail cast from Ryan bates <a href="http://railscasts.com/episodes/347-rubber-and-amazon-ec2?view=comments" rel="nofollow">http://railscasts.com/episodes/347-rubber-and-amazon-ec2?view=comments</a>. In that rail cast he did not list the ami but the config did require me to list the ami so I did. Here is a link to my config.</p>
  
  <p><a href="http://www.text-upload.com/read,4081177118013" rel="nofollow">http://www.text-upload.com/read,4081177118013</a></p>
  
  <p>I have tried different ami's as well. I have also checked each stackoverflow questions and but there are no answers. rubber connects and I can check in aws console the instance is launched but it gets stuck on that line.</p>
  
  <p>I tried cap rubber:bootstrap. i also tried cap rubber:destroy_all and then cap rubber:create_staging</p>
  
  <p>Here is what it gets stuck at.</p>
  
  <pre><code>  * executing `rubber:create_staging'
  Hostname to use for staging instance [production]: 
  Roles to use for staging instance [apache,app,collectd,common,db:primary=true,elasticsearch,examples,graphite_server,graphite_web,graylog_elasticsearch,graylog_mongodb,graylog_server,graylog_web,haproxy,mongodb,monit,passenger,postgresql,postgresql_master,web,web_tools]: 
    * executing `rubber:create'
    * Security Group already in cloud, syncing rules: rubbertest_production_examples
    * Security Group already in cloud, syncing rules: rubbertest_production_haproxy
    * Security Group already in cloud, syncing rules: rubbertest_production_web
    * Security Group already in cloud, syncing rules: rubbertest_production_monit
    * Security Group already in cloud, syncing rules: rubbertest_production_graylog_elasticsearch
    * Security Group already in cloud, syncing rules: rubbertest_production_mongodb
    * Security Group already in cloud, syncing rules: rubbertest_production_db
    * Security Group already in cloud, syncing rules: rubbertest_production_web_tools
    * Security Group already in cloud, syncing rules: rubbertest_production_collectd
    * Security Group already in cloud, syncing rules: rubbertest_production_common
    * Security Group already in cloud, syncing rules: rubbertest_production_production
    * Security Group already in cloud, syncing rules: rubbertest_production_default
    * Security Group already in cloud, syncing rules: rubbertest_production_postgresql
    * Security Group already in cloud, syncing rules: rubbertest_production_graylog_server
    * Security Group already in cloud, syncing rules: rubbertest_production_elasticsearch
    * Security Group already in cloud, syncing rules: rubbertest_production_passenger
    * Security Group already in cloud, syncing rules: rubbertest_production_graphite_server
    * Security Group already in cloud, syncing rules: rubbertest_production_graylog_web
    * Security Group already in cloud, syncing rules: rubbertest_production_graylog_mongodb
    * Security Group already in cloud, syncing rules: rubbertest_production_graphite_web
    * Security Group already in cloud, syncing rules: rubbertest_production_apache
    * Security Group already in cloud, syncing rules: rubbertest_production_postgresql_master
    * Security Group already in cloud, syncing rules: rubbertest_production_app
   ** Creating instance ami-eafa77da/m1.small/rubbertest_production_default,rubbertest_production_web,rubbertest_production_web_tools,rubbertest_production_production,rubbertest_production_apache,rubbertest_production_app,rubbertest_production_passenger,rubbertest_production_collectd,rubbertest_production_common,rubbertest_production_monit,rubbertest_production_db,rubbertest_production_postgresql,rubbertest_production_postgresql_master,rubbertest_production_elasticsearch,rubbertest_production_examples,rubbertest_production_graphite_server,rubbertest_production_graphite_web,rubbertest_production_graylog_elasticsearch,rubbertest_production_graylog_mongodb,rubbertest_production_mongodb,rubbertest_production_graylog_server,rubbertest_production_graylog_web,rubbertest_production_haproxy/Default
   ** Instance production created: i-eb8717d8
  Waiting for instances to start...........................................
   ** Instance running, fetching hostname/ip data
    * executing `rubber:_allow_root_ssh'
    * executing "sudo -p 'sudo password: '  bash -l -c 'cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
      servers: ["50.112.28.254"]
  . ** Failed to connect to 50.112.28.254, retrying
    * executing `rubber:_allow_root_ssh'
    * executing "sudo -p 'sudo password: '  bash -l -c 'cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
      servers: ["50.112.28.254"]
  .............. ** timeout in initial connect, retrying
    * executing `rubber:_allow_root_ssh'
    * executing "sudo -p 'sudo password: '  bash -l -c 'cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
      servers: ["50.112.28.254"]
  . ** Can't connect as user ubuntu to 50.112.28.254, assuming root allowed
    * executing `rubber:_direct_connection_50.112.28.254_864'
    * executing "echo"
      servers: ["50.112.28.254"]
  ..    [50.112.28.254] executing command
   ** [out :: 50.112.28.254] Please login as the bitnami user rather than root user.
   ** [out :: 50.112.28.254] 
  .....    command finished in 14009ms
    * executing `rubber:setup_static_ips'
    * executing `rubber:setup_local_aliases'
   ** Writing out aliases into local machines /etc/hosts, sudo access needed
  Password:
   ** Auto role: apache =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: app =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: passenger =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: collectd =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: common =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: monit =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: db =&gt; production.foo.com, {:primary=&gt;true, :platform=&gt;"linux"}
   ** Auto role: postgresql =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: postgresql_master =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: elasticsearch =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: examples =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: graphite_server =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: graphite_web =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: graylog_elasticsearch =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: graylog_mongodb =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: mongodb =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: graylog_server =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: graylog_web =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: haproxy =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: web =&gt; production.foo.com, {:platform=&gt;"linux"}
   ** Auto role: web_tools =&gt; production.foo.com, {:platform=&gt;"linux"}
    * executing `rubber:setup_remote_aliases'
      servers: ["production.foo.com"]
   ** sftp upload #&lt;StringIO:0x000001029984c0&gt; -&gt; /tmp/setup_remote_aliases
  </code></pre>