ec2 instance lost it's Private IPv4 address

0

I have an ec2 instance and it lost it's Private IPv4 address in random time. I can login via aws console and I can't see ip address for ens5 interface. When I restart the instance it gives back the ip address. Instance: Ubuntu 20.04.6 with 2 docker container: influxdb, grafana What can I do in this situation? Is it aws problem? Thanks.

1 Answer
1

Losing a Private IPv4 address in an EC2 instance is unusual. When a new EC2 instance is launched into an IPv4 subnet the instance receives a primary private IP address from the IPv4 address range of the subnet. A private IPv4 address, regardless of whether it is a primary or secondary address, remains associated with the network interface when the instance is stopped and started, or hibernated and started, and is only released when the instance is terminated

Related link for additional support: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html

In case you are facing an unexpected behavior different to the explanation above, I suggest you also consider checking the EC2 status. Make sure that there are no ongoing incidents in the AWS region where your EC2 is hosted. AWS's status page will have this information.

https://status.aws.amazon.com

If you observed an unexpected behavior but the EC2 service was up and running on your region during your considered timestamp, as next troubleshooting step I would suggest checking the EC2 Instance Logs. You can use the AWS Console to get the system log or you can SSH into the instance and check the logs. Look for any errors or messages that might indicate what happened to the network interface. You can try using 'dmesg' or try looking at the logs in '/var/log/'

If all else fails and the issue persists, consider contacting AWS Support to further deep dive into your issues.

I hope that helps,

Rocky

profile pictureAWS
answered a year 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