Skip to content

Error acessing ec2 linux ubuntu instance

0

have install ubuntu on 23.10 ans everythin has good until today. The instance is running heatk check ok but everytime i acess to ip/port i get

This site can’t be reached ec2-13-60-67-252.eu-north-1.compute.amazonaws.com took too long to respond. Try:

Checking the connection Checking the proxy and the firewall ERR_CONNECTION_TIMED_OUT

This site can’t be reached 13.60.67.252 refused to connect. Try:

Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED

what can be the issue?

asked 10 months ago149 views

1 Answer
0

Based on the error messages you're seeing, there are several potential issues that could be preventing access to your EC2 Ubuntu instance:

  1. Security Group Configuration: The most common cause is that your security group isn't properly configured to allow inbound traffic on the port you're trying to access. Make sure your security group has inbound rules that allow traffic on the specific port your application is using (e.g., port 80 for HTTP, port 443 for HTTPS).

  2. Firewall Settings: The Ubuntu instance might have its internal firewall (ufw/iptables) enabled and blocking incoming connections. You need to verify that the firewall on your instance allows inbound traffic on the required ports.

  3. Application Status: The application or service you're trying to access might not be running on the instance. Check if your web server (like Apache, Nginx) or other service is actually running.

  4. Network Configuration: Ensure that your EC2 instance is in a public subnet with an internet gateway attached, allowing for the necessary outbound and inbound traffic.

  5. Instance State: Although you mentioned the health check is OK, verify that your instance is fully operational and not experiencing any system-level issues.

To troubleshoot:

  • Check your security group settings in the EC2 console
  • Connect to your instance using EC2 Instance Connect or SSH (if you can) to verify the application status
  • Check the system logs for any errors
  • Verify that your application is configured to listen on the correct network interfaces (sometimes applications only listen on localhost/127.0.0.1 by default)
  • Restart your application service if necessary

If you're unable to connect via SSH to troubleshoot, you might need to check if port 22 is open in your security group and that the EC2 Instance Connect IP range for your region (eu-north-1) is allowed.
Sources
Troubleshoot issues connecting to your Amazon EC2 Linux instance - Amazon Elastic Compute Cloud
Failed to connect to Ubuntu EC2 instance | AWS re:Post
Facing problem while connecting ec2 instance | AWS re:Post
EC2 Instance Connect cannot connect to my instance ! | AWS re:Post

answered 10 months ago

EXPERT

reviewed 10 months 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.