橡胶自动重启后无法连接到ec2实例

时间:2012-07-18 15:08:09

标签: ruby-on-rails amazon-ec2

在这里输入代码我是第一次尝试使用橡胶部署到ec2 rails 3应用程序。在命令帽橡胶运行期间: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

问题是通过运行rubber:create或任何其他橡胶命令,在创建和初始化实例之后,在写入/ etc / hosts文件之后,我收到“连接失败”错误,一切都停在那里。

如果我对hosts文件中写入的地址执行ssh,那么我就可以完美地连接到实例,所以我不明白问题出在哪里......

1 个答案:

答案 0 :(得分:0)

确保从EBS卷/ dev / xvda1已经附加到ex2实例。

转到EC2 - >卷并查看您拥有的EBS卷。如果您看到卷处于可用状态,请尝试将其附加到ec2实例并重新启动实例。