ここにコードを入力してください初めてゴムを使用して EC2 に Rails 3 アプリをデプロイしようとしています。コマンド cap rubber:create_staging の実行中に、インスタンスは再起動を要求され、接続を受け入れません。これはどのように見えるかです:
** [out :: production.foo.com] Setting up grub2-common (1.99-21ubuntu3.1) ...
** [out :: production.foo.com] Setting up grub-pc-bin (1.99-21ubuntu3.1) ...
** [out :: production.foo.com] Setting up grub-pc (1.99-21ubuntu3.1) ...
** [out :: production.foo.com] Generating grub.cfg ...
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] Found linux image: /boot/vmlinuz-3.2.0-26-virtual
** [out :: production.foo.com] Found initrd image: /boot/initrd.img-3.2.0-26-virtual
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1.
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] Found linux image: /boot/vmlinuz-3.2.0-23-virtual
** [out :: production.foo.com] Found initrd image: /boot/initrd.img-3.2.0-23-virtual
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] /usr/sbin/grub-probe: warn:
** [out :: production.foo.com]
** [out :: production.foo.com] disk does not exist, so falling back to partition device /dev/xvda1
** [out :: production.foo.com] .
** [out :: production.foo.com] Found memtest86+ image: /boot/memtest86+.bin
** [out :: production.foo.com] done
** [out :: production.foo.com] Processing triggers for libc-bin ...
** [out :: production.foo.com] ldconfig deferred processing now taking place
** [out :: production.foo.com] Processing triggers for resolvconf ...
** [out :: production.foo.com] resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything.
** [out :: production.foo.com] Processing triggers for initramfs-tools ...
** [out :: production.foo.com] update-initramfs: Generating /boot/initrd.img-3.2.0-26-virtual
command finished in 131854ms
* executing "echo $(ls /var/run/reboot-required 2> /dev/null)"
servers: ["production.foo.com"]
[production.foo.com] executing command
command finished in 460ms
* executing "echo $(ls /mnt/your_app_name-production 2> /dev/null)"
servers: ["production.foo.com"]
[production.foo.com] executing command
command finished in 473ms
** Updates require a reboot on hosts ["production.foo.com"]
** Rebooting ...
* executing "sudo -p 'sudo password: ' reboot"
servers: ["production.foo.com"]
[production.foo.com] executing command
command finished in 479ms
* executing `rubber:_direct_connection_production.foo.com_887'
* executing "echo"
servers: ["production.foo.com"]
** Failed to connect to production.foo.com, retrying
問題は、インスタンスが作成されて初期化された後、/etc/hosts ファイルが書き込まれた後に、rubber:create またはその他のラバー コマンドを実行すると、「接続に失敗しました」というエラーが表示され、すべてがそこで停止することです。
hostsファイルに書いてあるアドレスにsshすれば、ちゃんとインスタンスに接続できるのでどこに問題があるのかわかりません…</p>