- Newest
- Most votes
- Most comments
When your EC2 instance becomes unreachable and the IP address isn't working, there are several potential causes and troubleshooting steps you can take:
First, check the instance status in the AWS Management Console. Verify that both "System status" and "Instance status" show "OK". If the system status isn't OK, there might be an issue with the AWS infrastructure. If the instance status isn't OK, you may need to reboot your instance to resolve minor issues.
Common reasons for connectivity issues include:
-
IP address changes: When you stop and start an EC2 instance, its public IP address changes unless you're using an Elastic IP. Consider using an Elastic IP address for consistent connectivity.
-
Security group configuration: Ensure your security group allows inbound traffic on the necessary ports (e.g., port 22 for SSH).
-
Network configuration: Check route tables and network ACLs for the subnet to ensure they're configured correctly.
-
Instance health issues: Review the instance's system logs for error messages by accessing "Monitor and troubleshoot" > "Get system log" from the EC2 console.
If the instance becomes unreachable after being powered off for an extended period, try these steps:
- Reboot the instance
- If rebooting doesn't work, try stopping and starting the instance (note this will change the public IP)
- Check for any scheduled maintenance or other events affecting connectivity
If you still can't connect, you might need to use alternative connection methods like AWS Systems Manager Session Manager or EC2 Serial Console to troubleshoot further.
Sources
EC2 instance is not reachable at all | AWS re:Post
Cannot connect yo my instance anymore | AWS re:Post
Restore connection to EC2 instance | AWS re:Post
Can't connect to instance | AWS re:Post
answered a year ago
Relevant content
- AWS OFFICIALUpdated 4 years ago
