My VPS cannot be logged on (it should be from on the 16 th to on the 17 th today ). You cannot log on from ssh or access the above blog. Through the background console check, we found that sshd and nginx services are both normal. If you attempt to disable the iptables service, the result is the same, but you still cannot log on.
Check/var/log/messages and find any dhcp error:
[Root @ vultr log] # cat messages
Oct 16 04:02:01 vultr rsyslogd: [origin software = "rsyslogd" swVersion = "5.8.10" x-pid = "1060" x-info = "http://www.rsyslog.com"] rsyslogd was HUPed
Oct 16 12:41:07 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 12:41:07 vultr dhclient [995]: DHCPACK from 169.254.169.254 (xid = 0x78f0325a)
Oct 16 12:41:09 vultr dhclient [995]: bound to 45.76.193.249 -- renewal in 35909 seconds.
Oct 16 18:18:52 vultr ntpd [1557]: 0.0.0.0 0618 08 no_sys_peer
Oct 16 22:39:38 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:39:43 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:39:51 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:40:05 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:40:20 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:40:33 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:40:47 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:40:59 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:41:11 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:41:23 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:41:44 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
Oct 16 22:42:05 vultr dhclient [995]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid = 0x78f0325a)
......
Oct 17 10:10:07 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:10:26 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:10:43 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:11:04 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:11:17 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:11:32 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:11:44 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:11:57 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:12:16 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
Oct 17 10:12:29 vultr dhclient [995]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid = 0x78f0325a)
When the case is opened to the background, the background replies:
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 contains des the necessary file paths and deployments. 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 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
As you can see, in a virtualized environment, some linux versions may fail to renew dhcp due to bugs. Therefore, no external connection can be connected to my host.
Solution:
Static IP addresses are used instead of dhcp:
/Etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 12.34.567.890
NETMASK = 255.255.254.0
GATEWAY = 98.76.543.1
DNS1 = 111.22.33.44
/Etc/sysconfig/network-scripts/route-eth0
666.777.0.0/16 dev eth0