ECS Service Cannot Connect: CloudMap vs. ECS Namespace

0

I have 2 ECS Services; one is a webserver, the other a Redis server. Both run as Fargate instances in the same ECS Cluster. The webserver cannot connect to redis. The ECS Namespace 'app.geoapp.local' shows both services: geo-webserver and app-redis (discovery name = redis-sc). So geo-webserver should be able to resolve app.geoapp.local because it is a member. But it cannot connect to redis using redis://app.geoapp.local:6379 with the error: "Cannot resolve app.geoapp.local." It connects OK to redis using the internal ip: redis://ip-10-0-1-111.us-west-2.compute.internal:6379, so likely not an SG issue. Also, DNS is enabled on the VPC. So why can't the webserver resolve app.geoapp.local? Looking at the same namespace 'app.geoapp.local' in CloudMap console, it shows different services: 'redis' and 'redis-sc,' but no 'geo-webserver.' Is that normal, CloudMap and ECS Namespaces different? I could "Create Service" in CloudMap and add the webserver manually, but would that overwrite the service already listed in the ECS Namespaces version or create a separate instance? I'd like to specify that webserver DependsOn redis, but I don't see how to do that other than manually editing the CloudFormation template. Any ideas on what I should try? Thanks!

沒有答案

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

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

回答問題指南