Instance is failed, my website is not loading

0

My website isn't loading. I checked my instance status: system status is fine but instance status is failed. What went wrong? What can I do to rectify it?

  • please accept the answer if it was useful

asked a month ago74 views
2 Answers
1

Hi,

The details around issues with instance status checks ( vs system status checks) are detailled here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html

The following are examples of problems that can cause system status checks to fail:


1. Incorrect networking or startup configuration
2. Exhausted memory
3.Corrupted file system
4. Incompatible kernel

My personal experience is that Incorrect networking or startup configuration is by far the most frequent source of issue, and most often it is issue with sec groups that don't allow access to EC2 monitoring. So, I'd start by checking vpc / subnet, sec groups and routing tables.

The first check that you may want to do is to try to access your EC2 Instance Connect which may bypasss the status check error: https://repost.aws/knowledge-center/ec2-instance-connect-troubleshooting

Best,

Didier

profile pictureAWS
EXPERT
answered a month ago
profile picture
EXPERT
A_J
reviewed a month ago
0
Accepted Answer

When your website isn't loading and the AWS EC2 instance status shows as "failed," it indicates an issue with the software or configuration on the instance itself, rather than with the underlying physical host or network. Here are some steps you can take to troubleshoot and resolve the issue:

1. Check Instance Logs Start by checking the logs to understand what might be causing the failure. You can use the AWS Management Console to access the instance logs:

  • Go to the EC2 Dashboard.
  • Select your instance.
  • Choose Actions > Instance Settings > Get System Log. The system log may provide details on any errors or misconfigurations that are affecting the instance.

2. Review CloudWatch Metrics AWS CloudWatch can provide insights into what's happening with your EC2 instance:

  • Navigate to the CloudWatch console.
  • Check metrics such as CPU usage, disk reads/writes, and network traffic. Anomalies in these metrics can indicate underlying issues.

3. Check Security Groups and Network ACLs Ensure that your security settings are not inadvertently blocking traffic:

  • Verify Security Groups to ensure the correct ports are open (e.g., HTTP on port 80 and HTTPS on port 443).
  • Check Network ACLs for any rules that might be blocking incoming or outgoing traffic.

4. Instance Reboot Sometimes, a simple reboot can resolve the issue if it's due to a temporary glitch:

  • Reboot the instance from the EC2 console (Actions > Instance State > Reboot).
  • Be cautious with this approach, as it could disrupt ongoing processes.

5. Investigate Application Logs If your server is running but your application isn’t responding, check the application logs:

  • Connect to your instance via SSH.
  • Check application-specific logs (like Apache, Nginx, or application runtime logs) located in /var/log or your application's designated log directory.

6. Check Configuration Files Incorrect configuration settings can cause failures. Verify configurations for your web server (Apache, Nginx, etc.) and any other critical services.

7. Restore from Snapshot or Backup If you suspect that the instance is corrupted or has made irreversible changes:

  • Restore the instance from a snapshot or backup if available. This can revert the system to a previous state when it was functioning correctly.

8. Replace the Instance If all else fails, consider launching a new instance:

  • Set up a new EC2 instance.
  • Deploy your application and redirect traffic to the new instance.

9. Contact AWS Support If you're unable to resolve the issue or identify the cause, reaching out to AWS Support can be beneficial, especially if you have an active support plan.

Taking these steps should help you diagnose and potentially fix the problem causing your instance to fail. If the situation persists, it might be beneficial to look deeper into specific configuration files or seek direct assistance from someone with system administration expertise.

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
A_J
reviewed a month ago
  • Thank you for your detailed answer - sorry for late acceptance. It was fixed by simple robooting at the instance interface. It didn't change status immediately, but minutes later & refreshing the status, it was working. I also installed anti-viral plug-ins additionally from this experience.

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