解决VPS的dhcp续租挂死问题

我的VPS无法登陆了(应该是从16号的12:41到今天17号10:12)。从ssh无法登陆,上面的blog也访问不了。通过后台console检查,发现sshd服务和nginx服务都是正常的。尝试关闭iptables服务,结果也是一样,还是无法登陆。

检查/var/log/messages,发现有关于dhcp的报错:

开了case给后台,后台回复说:

Andres Fernandez 2016-10-16 22:04:52
Hello,

Thank you for contacting us.

Please try setting your OS’s network interface configuration for static IP assignments in this case. The blue “network configuration examples” link on the “Settings” tab includes the necessary file paths and configurations. This configuration change can be made via the provided web console.

Setting your instance’s IP to static will prevent any issues that your chosen OS might have with DHCP lease failure. Any instance with additional IPs or private networking enabled will require static addresses on all interfaces as well.

Andres Fernandez
System administrator


Lloyd Slade 2016-10-16 22:32:32 Hello,

We are aware of a bug with certain distributions of Linux that causes DHCP leases to fail in a virtualised environment such as ours. Until a fix is available, we recommend setting a static configuration.

Lloyd W. Slade
System Administrator

可以看到,在虚拟化的环境中,有些linux的版本因为bug,会导致dhcp续租失败。所以任何外部连接都无法连到我的host上了。

解决方法:
采用静态IP,不采用dhcp:

相关文章

2条评论

    1. 是的,如果IP换了,后面一堆的东西要改。所以还是设置成静态IP比较好。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据