Skip to content

ACM+ALB+EC2+onamae.com (registrar) access to subdomain always "connection timed out"

0

I have a domain with registrar onamae.com, for which I am attempting to set up https access to its subdomain.

Here are the steps completed so far;

  • SSL issued via registrar DNS setting
  • Load balancer created
  • Target group, with target EC2 instance registered and healthy

Here is what my security groups looks like; EC2:

  • SSH 22 0.0.0.0/0
  • HTTP 80 default security group ( which is All traffic, and itself as source)
  • HTTPS 443 same as above Load balancer:
  • Default all traffic

Load balancer listener:

  • HTTPS:443 w/ the required setup with SSL cert and target group

However, accessing my subdomain https://a.b.c always returns "took too long to respond... ERR_CONNECTION_TIMED_OUT".

I only have a single VPC and I have tried debugging with dig command, comparing the URL with the DNS name, but both returned the same IP addresses.

What can I do to better troubleshoot please? I am quite new to AWS, so kindly let me know with specific instructions please.

3 Answers
2
Accepted Answer

Hello ,

Thank you for posting your question on the AWS Repost, my name is Rochak and it will be a pleasure assisting you with this today.

I understand when you try to reach your domain, you are receiving the error "took too long to respond... ERR_CONNECTION_TIMED_OUT". You have also tried have tried debugging with dig command, comparing the URL with the DNS name, but both returned the same IP addresses. Please, let me know if my understanding is incorrect.

An ERR_CONNECTION_TIMED_OUT error typically means there is something wrong with your local network connection.

Usually, the error indicates that the server didn't respond to the client and the client program gave up (timed out). The following are common causes for this error:

• The security group or network ACL doesn't allow access. • There's a firewall on the instance's operating system. • There's a firewall between the client and the server. • The host doesn't exist.

Resolution

For the “Connection timed out” error, verify the following • The instance's IP address or hostname is correct. • The instance is passing its health checks. • The security group of the instance allows incoming traffic on TCP port 22. • The network ACLs of instance subnet allows incoming traffic on TCP port 22 and allow ephemeral port for the outgoing traffic. • The route table of the instance’s subnet is configured properly to provide connectivity between EC2 instance and the SSH client. • There isn't a firewall blocking the connection between SSH client and the EC2 instance. • SSH isn't blocked by TCP Wrappers in the instance.

Note: The last two verification steps require OS-level access of the instance.

I am also sharing with you the step by step tutorial from one of our AWS engineer on resolving “Connection timed out” issue. [1]

Please also check the reference video guide which will guide you through various setup specific to your browser. [2]

I hope this helps. If you need further info, let me know in the comments; otherwise I'd appreciate if you mark my answer as "accepted".

Kind regards, Rochak from AWS

References: [1] "Connection timed out" errors connecting to my EC2 Instance https://www.youtube.com/watch?v=TAHafjKM3FU&t=1s

[2] How to Fix the ERR_CONNECTION_TIMED_OUT Error (Step by Step) https://www.youtube.com/watch?v=z7Bx0YUNkSE

AWS
answered 3 years ago
EXPERT
reviewed 3 years ago
  • Thank you for this Rochak, super helpful. I walked through most of your suggestions, and came across a dupe that I observed in Route 53 and the local registrar I used (onamae.com) to set up the subdomain. As I couldn't find anything else to be the obvious bug, could it be that this is the cause of a connection timed out?

1

Hello,

Thank you for the response. I am glad that you checked through above steps. I cannot say for sure that the duplicate in Route 53 might have caused it without knowing the details about the setup and the resources but definitely the error has to do with the networking. When a user asks for access from a website, a countdown or timer begins to run, and if the request is not able to reach the user before the countdown expires, the Err connection timeout happens. However, here are the some further checks that you can perform regarding “Connection timed out”. [1][2]

I hope this helps. If you need further info, let me know in the comments; otherwise I'd appreciate if you mark my answer as "accepted".

Kind regards,

Rochak from AWS

References:

[1] Error connecting to your instance: Connection timed out https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectionTimeout

[2] Ways to fix the ERR_Connection_Timed_Out https://www.atatus.com/blog/11-ways-to-fix-the-err-connection-timed-out-error/#What-is-ERR_CONNECTION_TIMED_OUT-Error?

AWS
answered 3 years ago
EXPERT
reviewed 3 years ago
  • thanks again, I tried removing the duped DNS settings in Route 53, but it didn't quite do the job. I can also confirm that the proxy settings in my mac/chrome are disabled, but unfortunately the same results... I have also looked through the VPC/subnet/route tables as you kindly attached, but everything seems to be in line (i.e. default). Will continue trying.

0

Accepting Rochak's first answer, as it specifically told me to double check my load balancer's security groups. However, I would like to add one point that I found slightly misleading (perhaps as a newcomer to AWS) about the default settings.

By default, the inbound rule for my load balancer had the - All traffic - inclusion, which I interpreted to mean that both HTTP:80 and HTTPS:443 with source 0.0.0.0/0 were included. However, through a day of process of elimination and a last resort attempt, I explicitly added two new scopes to the rule, and now it seems to be working.

So currently, my inbound rules;

  • All traffic,
  • HTTP 0.0.0.0/0
  • HTTPS 0.0.0.0/0

Please let me know if I am misinterpreting anything or should review some definitions.

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