App Connection Error

0

I have set up a simple server side application to consume from any client on the internet. However, I keep getting connection timedout/refused errors. when I try to test from a app test platform (POSTMAN) when the app is running on the active EC2 instance. The EC2 instance is a Linux machine where I have also installed all the dependencies of the server application built with python, I have set athe network secuirty parameters as recommended during the set up or basically left it at default values, I have configured the ACL rules for inbounds and outbounds to accommodate and direct http, https, ssh to go to port: 5000 as configured in the app config files (config.py). But I can't get to consume the apis on the server. How can I get connect to it while using the free tier resource ?

已提問 3 個月前檢視次數 285 次
1 個回答
1

Hello.

What are the specific settings for the EC2 security group?
In particular, this time, if the API listening port is not allowed in the security group's inbound rules, a timeout error will occur.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-security-groups.html#adding-security-group-rule

Also, does EC2 have a public IP address set?
In that case, please make sure that the route to the Internet gateway is set in the route table of the subnet where EC2 is running.
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html

If you have configured a network ACL on the subnet, please configure it to allow the API listening port for inbound and ephemeral ports (1024 to 65535) for outbound.
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html

profile picture
專家
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南