Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster bootstrap failed to start when there are multiple container in a ECS task #542

Open
sfali opened this issue May 10, 2019 · 2 comments
Open

Comments

@sfali
Copy link

@sfali sfali commented May 10, 2019

In our ECS (with Fargate) task we have two containers running, one is Akka application and other is a sidecar container. The ECSServiceDiscovery successfully resolves the IP addresses of both containers (which is the same IP address) but the cluster eventually failed to start since ECSServiceDiscovery is returning resolved targets without port:

ResolvedTarget(host = address, port = None, address = Try(InetAddress.getByName(address)).toOption)

while BootstrapCoordinator filters multiple results based on port:

multipleResults.filter(_.port.contains(settings.contactPoint.fallbackPort))

The Akka version we are using is 2.5.22 while Akka Management version is 1.0.0

Regards,

Syed

@chbatey

This comment has been minimized.

Copy link
Member

@chbatey chbatey commented May 14, 2019

Hi @sfali I'm not very familiar with ECS, would there be a way to get the port from the API? If so could you raise a PR?

@sfali

This comment has been minimized.

Copy link
Author

@sfali sfali commented May 14, 2019

I looked at different options on how to resolve this, one way is to call describe-task-definition on each container and then get a container such that whose port matches Akka management port, I think this would be overkill.

I think there would be one and only one container running Akka, I am thinking to introduce an optional property akka.management.cluster.bootstrap.contact-point-discovery.container-name, for multiple containers pass the container name and service discovery will filter out based on the container name.

I'll try this and will create a PR.

Regards,

Syed

sfali added a commit to sfali/akka-management that referenced this issue May 17, 2019
… has

more than one containers akka#542

* Update `reference.conf` to introduce `container-name` parameter
* Filter out containers if `containerName` is defined
sfali added a commit to sfali/akka-management that referenced this issue May 17, 2019
* Provided script and CF template for multi-container test
* Updated README
sfali added a commit to sfali/akka-management that referenced this issue May 22, 2019
* make app name and cluster name configurable
sfali added a commit to sfali/akka-management that referenced this issue May 22, 2019
* updated documentation
@chbatey chbatey added 1 - triaged and removed 0 - new labels Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.