terraform-aws-ecs-service icon indicating copy to clipboard operation
terraform-aws-ecs-service copied to clipboard

public-sd/fargate example -- server is not coming up

Open JonRoma opened this issue 7 years ago • 3 comments

Issue by cmaturi Thursday Aug 09, 2018 at 16:42 GMT Originally opened as https://github.com/cites-illinois/as-aws-modules/issues/70


Created the ecs service. Name -- fargate-sd When tried to ping the server ith the following command $ curl fargate.discover.as-test.techservices.illinois.edu Receiving the following error curl: (6) Could not resolve host: fargate.discover.as-test.techservices.illinois.edu Found out that the tasks are being stopped because of the time out issue. (Timeout waiting for service discovery instance provisioning to complete.)

JonRoma avatar Oct 30 '18 02:10 JonRoma

Comment by ddriddle Friday Aug 10, 2018 at 01:05 GMT


@cmaturi the config was bad. It was pointing at the wrong namespace. After the fix it still does not work :-( The reason being is that the DNS record returns the private IP address of the container instead of the public IP. Not sure why or how to fix it.

I will add that the private service discovery examples work great.

JonRoma avatar Oct 30 '18 02:10 JonRoma

@cmaturi @JonRoma ECS does NOT support public namespaces. See the service discovery documentation:

  • The Create Service workflow in the Amazon ECS console only supports registering services into private DNS namespaces. When a AWS Cloud Map private DNS namespace is created, a Route 53 private hosted zone will be created automatically.
  • Amazon ECS does not support registering services into public DNS namespaces. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html#service-discovery-considerations

@JonRoma can you please remove the public-sd examples since they are invalid and unsupported? When you have done this please close this ticket.

ddriddle avatar Dec 06 '18 18:12 ddriddle

@JonRoma looking at the GUI I am beginning to doubt the documentation... First the GUI does allow the selection of public namespaces. Could you try manually creating an ECS service that uses a public namespace and see if it works? I am curious.

ddriddle avatar Dec 07 '18 00:12 ddriddle

Example code isn't part of this repository, and there's no use case that merits attention to this ancient issue.

JonRoma avatar Feb 24 '23 17:02 JonRoma