Skip to content

This site can’t be reached. ec2-X-X-X-X.X.compute.amazonaws.com took too long to respond.

0

I recently set up a t3.micro EC2 instance on AWS using Ubuntu, but I'm having trouble accessing it. When I click on the Public IPv4 DNS link, I get a message saying it "took too long to respond."

Instance status:

Instance status

Instance Specifications:

  • Platform: Ubuntu (Linux/UNIX)

I clicked on the Public IPv4 DNS link, but its telling me this: Took too long to respond

Inbound Rules:

I've configured the inbound rules to allow traffic on port 8529, as I'm planning to work with ArangoDB. Inbound rules

Troubleshooting Steps Taken:

  • I've checked that there are no firewalls or proxies on my laptop.
  • I also tried accessing the instance from another laptop and my mobile device, but I still receive a ec2-X-X-X-X.X.compute.amazonaws.com refused to connect error. I've consulted various resources and tutorials, but nothing seems to resolve the issue.

Questions:

  1. What could be causing this connection issue?
  2. Are there any additional configurations I might need to check in my security group or instance settings?
  3. Let me know if there are any other details needed in my description.

Any help would be greatly appreciated!

asked 9 months ago264 views
4 Answers
0
Accepted Answer

It sounds like you're experiencing connection issues with your EC2 instance, especially since you are trying to work with ArangoDB on port 8529. Here are some possible causes and steps to troubleshoot your connection issue:

Potential Causes and Troubleshooting Steps

  1. Security Group Configuration:

    • Ensure that the inbound rule specifically allows traffic on port 8529 from your IP address or from all IP addresses (0.0.0.0/0) for testing purposes. The rule should look like this:
      • Type: Custom TCP
      • Protocol: TCP
      • Port Range: 8529
      • Source: Your IP address (or 0.0.0.0/0 for testing)
    • After making any changes, remember to save the rules.
  2. ArangoDB Service Status:

    • Make sure the ArangoDB service is running on your instance. You can check the status using:

      sudo systemctl status arangodb3

    • If it's not running, you can start it with:

      sudo systemctl start arangodb3

  3. Check ArangoDB Configuration:

    • Verify that ArangoDB is configured to listen on the correct network interface. Check the configuration file (usually located at /etc/arangodb3/arangod.conf) for the following settings:

      endpoint = tcp://0.0.0.0:8529

    • If it's set to localhost or 127.0.0.1, it will not accept external connections. Change it to 0.0.0.0 to allow connections from any IP.

  4. Network ACLs:

    • Ensure that the Network Access Control Lists (ACLs) associated with your VPC are not blocking inbound or outbound traffic on port 8529.
  5. Instance Health:

    • Check the instance health and ensure that it is in the "running" state with no status check failures.
  6. Accessing the Correct URL:

    • Make sure you are accessing the ArangoDB web interface correctly. The URL should look like this:

      http://<Public_IP_or_DNS>:8529

    • If you're using HTTPS, make sure the appropriate port and configuration are set up.

  7. Reboot the Instance:

    • If you have made changes to the configuration or security group, sometimes rebooting the instance can help apply those changes.

Additional Questions

  • Have you tried connecting to ArangoDB using a command-line client or another tool (like curl or Postman) to see if you receive a different response?
  • If you have access to the EC2 instance via SSH, can you check the ArangoDB logs for any error messages? The logs are usually found in /var/log/arangodb3/.
answered 9 months ago
EXPERT
reviewed 9 months ago
0

Are you running a webserver on the EC2? If not you will not get a response

EXPERT
answered 9 months ago
  • Yes, I have the arangodb server running

  • When accessing arangodb have you ensured that you are using the correct port at the end of the EC2 domain? For example http://ec2-X-X-X-X.X.compute.amazonaws.com:8529? If this doesn't work I would suggesting SSH'ing into the the EC2 instance and troubleshooting the database install and configuration locally.

  • Gary_s Is correct..When you click on the Public IPv4 DNS link, I get a message saying it "took too long to respond." it will open on port 443 by default. Update the port and chang to HTTP

  • Thankyou @Gary_S and @Gary Mclean!

0

Based on the information provided, there are several potential reasons for the connection issue you're experiencing with your EC2 instance. Here are some key points to consider and steps to take:

  1. Security Group Configuration: While you've configured the inbound rules to allow traffic on port 8529 for ArangoDB, it appears that you haven't allowed traffic on the standard web ports (80 for HTTP and 443 for HTTPS). If you're trying to access a web service, you need to add rules for these ports in your security group.

  2. Web Server: Ensure that a web server (like Apache or Nginx) is installed and running on your EC2 instance. If no web server is running, there won't be anything to respond to HTTP requests.

  3. Application Configuration: If you're specifically trying to access ArangoDB, make sure it's properly installed, configured, and running on your instance. Also, verify that it's set to listen on the correct port (8529) and interface.

  4. Network ACLs: Check the Network Access Control Lists (ACLs) for your subnet. Ensure that they allow inbound and outbound traffic on the necessary ports.

  5. Route Table: Verify that the route table associated with your instance's subnet has a route to an Internet Gateway for public internet access.

  6. Instance Status: While your screenshot shows the instance status as "running", double-check that it's passing all status checks.

  7. Firewall on the Instance: Ubuntu comes with a built-in firewall called UFW (Uncomplicated Firewall). Make sure it's not blocking incoming connections.

To troubleshoot further:

  1. Try to SSH into your instance to confirm basic connectivity.
  2. Check the instance's system logs for any error messages.
  3. Verify that your application (ArangoDB in this case) is running and listening on the correct port.
  4. Consider temporarily allowing all inbound traffic in your security group for testing purposes (remember to revert this after testing).

If you've confirmed all these settings and are still unable to connect, you may need to reach out to AWS support for further assistance, as there could be underlying network or infrastructure issues.
Sources
Troubleshoot website connectivity on EC2 Windows instance | AWS re:Post
site can't reachable through the public IP | AWS re:Post
Unable to access the EC2 instance with the Public IP | AWS re:Post

answered 9 months ago
EXPERT
reviewed 9 months ago
0

Thankyou, @Gary_S. I tried troubleshooting the database config. I made changes to the /etc/arangodb3/arangod.conf file:

endpoint = tcp://127.0.0.1:8529

had to be changed to:

endpoint = tcp://0.0.0.0:8529

This allows ArangoDB to accept connections from any IP address.

Also, thanks to @Gary McLean, I switched to HTTP, and now I can access the database.

answered 9 months ago
EXPERT
reviewed 9 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.