Bobcares

EC2 Instance Reboot or Restart itself – How to troubleshoot

by | Aug 15, 2021

Does your EC2 Instance Reboot or Restart itself? We can help you.

Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.

Today, let us see how the Amazon EC2 instances reboot or restart unexpectedly.

 

EC2 Instance Reboot or Restart itself

The most common reasons for an unexpected reboot or restart include:

  • The instance fails one or both of its status checks.
  • The underlying hardware hosting the instance is faulty and Amazon EC2 restarts the instance to move it to new, healthy hardware.
  • Scheduled maintenance on the instance that required a reboot.
  • A user or application inside the server rebooted the instance.

Moving ahead, let us see several actions that we can take to determine why the instance reboots.

View status checks

From the console or with the use of AWS Command Line Interface (AWS CLI) we can view the instance’s status checks.

Suppose we receive errors when we run AWS CLI commands. Then we need to make sure that we use the most recent version of the AWS CLI.

View system logs

Suppose the instance didn’t fail a status check, then the instance might have rebooted due to operating system-level issues.

In that case, we review the system logs to determine the error that occurred.

Generally, we can find the system logs at /var/log/messages or /var/log/syslog depending on the OS distribution.

View reboot history

To determine if a user or an application inside the server has initiated the reboot, we use:

# grep reboot /home/*/.bash_history
# grep reboot /root/.bash_history
# history | grep -i reboot
# history | grep -i init
# last reboot

View AWS CloudTrail Events history

Instance reboots initiated from the Amazon EC2 console or through the AWS CLI appear in CloudTrail Events history. To view these events:

  1. Initially, we open the AWS CloudTrail console.
  2. Then we select Event history.
  3. Here, we can select the Event name from the filter drop-down and then enter RebootInstances.

[Need help with the fix? We can help you]

 

Conclusion

In short, we saw how our Support Techs fix the EC2 reboot or restart query.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.