- Newest
- Most votes
- Most comments
Hello.
It sounds like you're encountering several issues with your Debian instance, particularly around SSH connectivity, instance status checks, and command execution errors Please follow below steps.
Check System Logs
- Go to the EC2 Console.
- Select your instance.
- Click on Actions > Monitor and troubleshoot > Get System Log.
- Look for any error messages that might indicate what's wrong.
Stop and Start the Instance
- This action will migrate your instance to new hardware and might resolve underlying issues.
- In the EC2 Console, select your instance.
- Click on Instance State > Stop.
- Once stopped, click on Instance State > Start.
Reinstall Basic Packages
- If you can SSH into your instance (even if it's slow), run the following commands to ensure basic utilities are installed
sudo apt update
sudo apt install --reinstall coreutils
Check PATH Variable
- If you see errors like -bash: id: command not found, it might indicate a problem with your PATH. Run
echo $PATH
- If it’s incorrect, temporarily fix it with
export PATH=$PATH:/usr/bin:/bin
Monitor Resource Utilization
- Use the command top to check CPU and memory usage.
- If the instance is overloaded, consider resizing it to a larger instance type.
Create a New Instance
- If the issues persist, consider launching a new instance from a known good AMI (Amazon Machine Image).
- Reinstall your necessary software step by step to identify any potential issues.
https://repost.aws/knowledge-center/ec2-linux-status-check-failure
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-to-serial-console.html
The recurring "1/2 checks passed" status you're experiencing with your EC2 instance indicates that there's an ongoing issue with either the system status check or the instance status check. This problem can stem from various causes and may require different troubleshooting approaches.
Given that you've recreated your instance multiple times and switched from Ubuntu to Debian, it's possible that the issue is not related to the operating system itself, but rather to the instance configuration or underlying hardware.
The error messages you're seeing ("-bash: id: command not found" and "-bash: [: : integer expression expected") suggest that there might be problems with your instance's file system or system configuration. These could be caused by corrupted file systems, incorrect startup configurations, or issues with the instance's software environment.
To address this recurring problem:
-
Check the system logs of your instance. You can do this by selecting your instance in the EC2 console, then choosing Actions > Monitor and troubleshoot > Get System Log. This may provide more detailed information about what's causing the status check failure.
-
If possible, try connecting to your instance using the EC2 Serial Console. This can sometimes allow you to access the instance even when SSH is not working.
-
Consider stopping and starting your instance (not just rebooting). This often migrates the instance to a new underlying host, which can resolve hardware-related issues.
-
If the problem persists, you may want to create a new instance from a known good AMI, and then carefully reinstall your required software one by one, checking for stability at each step.
-
Ensure that you're not inadvertently blocking necessary ports or connections through your security groups or network ACLs.
-
If none of these steps resolve the issue, it may be worth reaching out to AWS Support for more in-depth troubleshooting, as there could be an underlying issue with the EC2 infrastructure in your region or availability zone.
Remember, consistent "1/2 checks passed" status often indicates a more fundamental problem that needs to be addressed, rather than just a temporary glitch. Careful investigation of logs and systematic testing of your setup may be necessary to identify and resolve the root cause.
Sources
Status checks listed as “1/2 checks passed”. | AWS re:Post
Status checks for Amazon EC2 instances - Amazon Elastic Compute Cloud
Status Check on instance show (1/2 checks passed) | AWS re:Post
EC2 Ubuntu Pro instance which is stucked in status checked 1/2 failed | AWS re:Post
Hello,
The "1/2 checks passed" issue on your EC2 instance likely points to a system or instance problem. Here's a quick way to troubleshoot:
- Check System Logs: In the EC2 console, go to Actions > Monitor and troubleshoot > Get System Log. It may show the cause.
- Stop/Start the Instance: This moves your instance to a new host, which may fix hardware issues.
- Review File System: The errors ("-bash: id: command not found") suggest possible system configuration issues. Recheck system packages.
- Use EC2 Serial Console: If SSH is slow, try the Serial Console to access your instance.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html
Hi, I generated the system log of my instance, I don't know how to read this, how I send for you this log? Thanks.
Result of EC2 Serial Console: This instance type is not supported for the EC2 serial console.
Relevant content
- asked 2 years ago
- Accepted Answerasked a year ago
- asked 3 years ago
- Accepted Answerasked 10 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 months ago