2

I'm currently on Windows 8, attempting to deploy my Rails app to Amazon EC2 with Rubber following the Railscast #347 Rubber and Amazon EC2.

However, when trying to run cap rubber:create_staging, I get the following error when Rubber attempts to connect the Amazon EC2 instance:

** Failed to connect to <ip address>, retrying
* [32m2014-03-04 18:30:08 executing `rubber:_ensure_key_file_present´
* [32m2104-03-04 18:30:08 executing `rubber:_allow_root_ssh´
* [33mexecuting "sudo -p ´sudo password: ´  bash -l -c ´mkdir -p /root/.ssh &
& cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/´"
  servers: ["<ip address"]

Every 15 attempts or so, it does this in between:

** timeout in initial connect, retrying
Trying to enable root login

And this just keeps on going, I let it try for 30 minutes to give the server time, so it's at least not about the server not-initializing.

Some suggestions I found on this were about the key_files, but I've checked those multiple times and am fairly certain they're correct. However, I am starting to doubt this is somehow related to windows. Could it be? The command it is trying to execute is for Linux, but I figured it's not for my computer, but the Amazon server its forwarding it to.

However, this is my first time deploying a Rails app and my knowledge about the subject is very limited, so I don't know about that. Thanks in advance to any help, it is hugely appreciated!

Here's my rubber.yml file.

Kasperi
  • 853
  • 7
  • 17
  • Could you paste your configuration file here? – Uri Agassi Mar 04 '14 at 17:56
  • Sure, added link to my rubber.yml file: http://pastebin.com/inBRmikN – Kasperi Mar 04 '14 at 18:10
  • Can you connect to the server manually (using ssh)? – Uri Agassi Mar 04 '14 at 18:14
  • I think I was able to connect with the EC2 browser Java-based SSH client, but haven't tried on my local terminal as I don't know the command for it. – Kasperi Mar 04 '14 at 18:24
  • I think you need to install putty(http://www.putty.org/) or some other ssh client(http://www.windows8downloads.com/win8-ssh.html) – Uri Agassi Mar 04 '14 at 18:33
  • Hmmm, ok, I'll see into it and see what I can do with it. – Kasperi Mar 04 '14 at 18:39
  • are you using Cygwin by any chance? – Rico Mar 04 '14 at 19:04
  • No, hadn't even heard of it before. Should I? The thing I'm wondering is if it's about the Windows that I am on, because there usually aren't individual messages for those kind of malfunctions. – Kasperi Mar 04 '14 at 20:43
  • I was able to connect with the same key file using Putty and set up Ruby/Rails/Nginx/Passenger on the server, but I really want to get Rubber to work. It's so much more convenient. At least now it's certain the key files are ok. But the question is now, besides the key files, what else could be wrong? Pretty much all else is default settings. – Kasperi Mar 05 '14 at 01:49
  • Any suggestions why it would allow to connect with Putty but not with Rubber Gem? – Kasperi Mar 05 '14 at 15:31
  • I'm having the same problem, but I did see an error in your rubber.yml file. you forgot to put the `.` in `'/.ec2/*'` – Justin Apr 15 '14 at 18:33

0 Answers0