My Halloween question of the day:
I'm trying to deploy an app in AWS ECS using two containers, one frontend app wrote in nodejs and a backend app wrote as spring-boot app. Only the frontend app will be exposed and all requests to rest apis will be proxied to backend.
Both containers are running and I can reach the backend from the frontend api but I get a bad request when I use curl to access the backend, for example:
curl http://BACKEND_SERVER:8080/api/config
However, if I try the same using telnet like the following example bellow, it works
telnet BACKEND_SERVER 8080
GET /api/config
Not strange enough, if I use HTTP/1.1, it doesn't work again.
telnet BACKEND_SERVER 8080
GET /api/config
curl works fine both from the host and from the container itself, only fails when run from the frontend container...
Any idea?
If only the frontend app is exposed. I suppose that backend app is in a private subnet. Check the security groups of the subnets if they have the input and output protocols. For example HTTP and HTTPS . Just check all the outputs of subnets, security groups and instances beacause i can't see the specific error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.