Status check fails if ec2 is changed to the past date

0

I want to operate on the past date.

However, if you set the system date to a date in the past, you will not be able to communicate in about one hour, and a status check error will occur.
Error 'Instance connectivity check failed with'

If the time synchronization is set and restarted, since the above problem does not occur, we think that it is an obstacle when setting the system date in the past.

Due to problem separation, creating the same type of instance and setting the time in the same way in the same way caused the same failure.

Is there a way to avoid it?

OS: CentOS7
Instance ID: i-041a2f09dbad0d8d0
Instance type: c5.large
Availability zone: ap-northeast-1a

ymgr002
asked 5 years ago263 views
1 Answer
0

We received technical support and resolved it.

I confirmed that the event will be reproduced in the verification environment using an instance that starts with the same AMI as the instance where the event occurred.
When updating the IP address after the dhcp client updated the date, the IP address could not be updated, the network connection was lost, and the instance status failed with the record that could be confirmed.

If it is the same event as above, you can think of a way to temporarily set the network to static (static) as a workaround.
I will inform you the specific operation procedure below.

  1. Stop time synchronization service
    $ sudo systemctl stop chronyd

  2. Please check the network settings
    Execute the following command and make a note of the setting contents.

$ ifconfig
$ route

  1. Change the network interface settings
    Please correct the setting file '/etc/sysconfig/network-scripts/ifcfg-ens5' according to the customer's environment based on the contents confirmed in 2.

Description example

BOOTPROTO=none
IPADDR=10.15.0.226
NETMASK=255.255.255.0
GATEWAY=10.15.0.1
DEVICE=ens5
ONBOOT=yes
TYPE=Ethernet
USERCTL=no

Example of description so far

  1. Change the name of an unnecessary setting file
    Because unnecessary network interface settings exist, restart of the network service will fail. Please change unnecessary setting file name with the following command.
    $ sudo mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/org_ifcfg-eth0

  2. Restart the network service.
    After changing the configuration file, restart the service with the following command.
    $ sudo systemctl restart network

※ When restarting the instance (OS restart), please note that the contents set in 3 will be rewritten to the original DHCP setting.

If the event recurs even if you change the network settings above, please share the following information.

 - syslog (files of /var/log/messages mainly when an event occurs)

ymgr002
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions