Every day I get “1/2 checks passed”

0

Hi, by many times I deleted and recreated my instance with Ubuntu, then the last decision for recreate my instance the chosen system was Debian, with debian installed I terminated all the packages installation of my project Java, MySQL, Node.js and Tomcat but I'm having some problems. By four times I've received status checks listed as “1/2 checks passed” then the result of this is "-bash: id: command not found -bash: [: : integer expression expected", I managed to do the deploy of my war file on the Tomcat but after a long time, opening an ssh connection takes a long time. Yesterday I received “1/2 checks passed” today too where am I going wrong?

asked a month ago86 views
5 Answers
2
Accepted Answer

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

EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
1

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. Ensure that you're not inadvertently blocking necessary ports or connections through your security groups or network ACLs.

  6. 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

profile picture
answered a month ago
1

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

profile picture
EXPERT
answered a month ago
0

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.

answered a month ago
0

Result of EC2 Serial Console: This instance type is not supported for the EC2 serial console.

answered a month 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