Closed davidATsains closed 4 years ago
Hard to say without seeing the code! You can typically use a systematic approach to debug these sorts of things, going through each step of the network path (you can check most of this in the AWS web console):
0.0.0.0/0
)? curl localhost:8080
to check. You can also look for errors in the system log output to see if there was an error in your User Data script.Any of the above could lead to the symptoms you're seeing, so check one at a time!
Hard to say without seeing the code! You can typically use a systematic approach to debug these sorts of things, going through each step of the network path (you can check most of this in the AWS web console):
- Does the security group of the ELB allow incoming TCP requests on port 80 from your IP (or from
0.0.0.0/0
)?- Are there any EC2 instances registered in the ELB?
- Are the health checks passing for those instances?
- Does the security group of the ELB allow outbound requests (necessary to send health checks)?
- Does the security group of the instances allow inbound requests from the ELB?
- Is the web server running on the instances? You can SSH to an instance and
curl localhost:8080
to check. You can also look for errors in the system log output to see if there was an error in your User Data script.Any of the above could lead to the symptoms you're seeing, so check one at a time!
I believed that since i used the security group both for the instance and elb in chapter 2, i used the same terraform code for chapter 3. Thus, this was the root of the problem. but now i have fixed it.
Chapter 3 section: The terraform_remote_state Data Source I am completed this section which taught me how the web sever cluster can access the database address and port via Terraform. I got the address for the alb dns but when i curl it on the command line or on a web browser nothing happens it times out Please can you tell where i went wrong? what can i do to address this?