- Newest
- Most votes
- Most comments
Hello,
Questions:
-
Does the connection simply hang when you try to initiate a connection?
-
Would you kindly post the system logs, if possible.
-
Have you tried to ping <EC2-PUBLIC-IP> from another local machine? Or try to SSH from another local machine to the EC2?
-
Have you tried enabling 'detailed monitoring'? There is an additional cost for this, I would suggest you turn it on when you are unable to connect to the instance and attempt several times to make a connection and then disable 'detailed monitoring' off again. You may enable detailed monitoring when the instance is running or stopped.
To enable detailed monitoring > Click on the check box next to the EC2 > Actions > Monitor and Troubleshoot > Manage detailed monitoring > Enable.
-
Any screenshots would be helpful, if possible.
Source:
https://blog.jineshkumar.com/enabling-or-disabling-detailed-monitoring-for-amazon-ec2-instances
answered 2 years ago
Based on the symptoms you've described, there could be several potential causes for your EC2 instance's intermittent connectivity issues. Here are some steps you can take to troubleshoot and potentially resolve the problem:
- Check Instance Status: Verify that your instance is in a "running" state and that the status checks are passing. Sometimes, underlying hardware issues can cause intermittent connectivity.
- Review System Logs: Examine the system logs in the EC2 console for any error messages or warnings that might indicate the root cause of the problem. Look for issues related to resource constraints, service failures, or unexpected shutdowns.
- Monitor Resource Usage: Use AWS CloudWatch or other monitoring tools to check if there are any spikes in CPU, memory, or disk usage that could be causing the instance to become unresponsive.
- Verify Network Configuration: Ensure that your security groups, network ACLs, and VPC settings are correctly configured and haven't been inadvertently changed.
- Check for Service Disruptions: Review the AWS Service Health Dashboard to see if there are any reported issues in your region that might be affecting your instance.
- Investigate Application Issues: If you're running a web application, check the application logs for any errors that might be causing the server to become unresponsive.
- Consider Instance Recovery: If the problem persists, you might want to try stopping and starting the instance (not just rebooting) to move it to new underlying hardware.
- Elastic IP: If you're not using an Elastic IP, consider associating one with your instance to maintain a consistent public IP address.
If these steps don't resolve the issue, and you continue to experience intermittent connectivity, it may be worth contacting AWS Support for further assistance. They can help investigate if there are any underlying infrastructure issues affecting your instance.
Sources
EC2 Suddenly stopped responding | AWS re:Post
Cannot connect to myec2 through ssh suddenly fronm today | AWS re:Post
Suddenly I can't connect to my ec2 server | AWS re:Post
Ec2 instance became repeatedly inaccessible despite multiple reboot attempts. | AWS re:Post
Relevant content
asked a year ago
asked 3 years ago
asked 8 years ago
asked 3 years ago

None of the suggestions worked.