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!

没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则