- Más nuevo
- Más votos
- Más comentarios
When you're experiencing connection timeouts on port 80 to your EC2 instance despite proper configuration, there are several potential causes to investigate:
-
Security Group Configuration: While you've mentioned that your security group allows HTTP traffic on port 80 from 0.0.0.0/0, double-check that there are no conflicting rules or that the rule is properly applied to your instance.
-
Network Interface: Verify that the elastic IP is correctly associated with the network interface of your EC2 instance. Sometimes after instance stops/starts, the association might need to be refreshed.
-
Application Binding: Ensure your web servers (Nginx/Apache) are binding to all interfaces (0.0.0.0) and not just localhost (127.0.0.1). This would explain why curl localhost works but external connections fail.
-
Instance Status: Check if your EC2 instance is experiencing high CPU usage or other performance issues that might cause it to drop connections.
-
VPC Configuration: Confirm that your subnet is a public subnet with proper routing to the internet gateway.
-
Elastic IP Configuration: If you recently associated or disassociated the Elastic IP, your web server configuration might need to be updated to reflect the new IP address.
-
Test with Telnet: Try using telnet from an external machine to test connectivity to port 80 on your instance.
-
Check Application Logs: Review your web server logs for any error messages that might indicate why connections are being dropped.
Since you've already verified many of these items, I would recommend:
- Checking if the application is actually listening on the public interface (not just localhost)
- Temporarily disabling any application-level firewalls
- Testing with a simple netcat listener on port 80 to rule out web server configuration issues
- Verifying that the instance's status checks are passing in the EC2 console
Sources
EC2 Website Connection Timeout | AWS re:Post
EC2 Instance that get ERR_CONNECTION_TIMED_OUT | AWS re:Post
EC2 Connection issue | AWS re:Post
Troubleshoot connection errors | AWS re:Post
Contenido relevante
- preguntada hace un año
- preguntada hace un año
- preguntada hace un año
- preguntada hace 4 meses
- OFICIAL DE AWSActualizada hace 10 meses
- OFICIAL DE AWSActualizada hace 10 meses

La verdad, ya solucioné el problema. Hice todo de nuevo, con una nueva ip y listo.