Issue
I am trying to set up an Apache Airflow server on ec2. I managed to get it running and verify status by hitting /health
endpoint using curl on http://localhost:8989
. Airflow listens on port 8989 here.
The next I want is to be able to connect to the admin dashboard/UI using the browser on EC2's public IP. So I added the inbound rule in the AWS security group ec2 instance belongs to.
While connecting to Airflow, I am getting the following error
Failed to connect to ec2-XX-XX-XXX-XXX.compute-1.amazonaws.com port 8989: Operation timed out
Not sure what else I need to do to reach server running on ec2.
Solution
If you can SSH to an EC2 instance, you've added a security group rule for ingress on another port, but can't reach the instance on that port, here are some other things to check:
Firewall running on the instance. Amazon Linux and recent official Ubuntu AMIs shouldn't have iptables or some other firewall running on them by default, but if you're using another AMI or someone else has configured the EC2 instance, it's possible to have iptables/ufw or some other firewall running. Check processes on your instance to make sure you don't have a firewall.
Network ACL on the VPC subnet. The default ACL will permit traffic on all ports. It's possible that the default has been changed to allow traffic only on selected ports.
Multiple security groups assigned to the EC2 instance. It's possible to assign more than one security group to the instance. Check to make sure you don't have a rule in some other security group that's blocking the port.
Answered By - jscott