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

Initialization delay before starting cote #36

Closed
claustres opened this issue Oct 22, 2019 · 1 comment
Closed

Initialization delay before starting cote #36

claustres opened this issue Oct 22, 2019 · 1 comment
Assignees

Comments

@claustres
Copy link
Member

claustres commented Oct 22, 2019

Steps to reproduce

Deploy 2 apps with a healthcheck bound to the server API on a Docker swarm using a Redis discovery.

Expected behavior

Cote should be able to initialize.

Actual behavior

Cote is not able to initialize correctly and raises unhandled error. It seems that until the healthcheck has passed the container hostname are not routable so that when an app is advertised we get errors like Error: getaddrinfo ENOTFOUND 28c5d24e6d1e 28c5d24e6d1e:10000 in the other app (28c5d24e6d1e is the container ID which is also the hostname of the advertised app in the docker overlay network).

However, for the healthcheck to succeed the app needs to be launched, which also launches cote, which then tries to resolve names using DNS, a serpent biting its own tail !

A way to solve this could be to update the architecture so that we can add a small delay before initializing cote so that we ensure the healthcheck has passed.

System configuration

Module versions (especially the part that's not working): 0.6

NodeJS version: 8.16

Operating System: Linux debian

claustres added a commit that referenced this issue Oct 22, 2019
@claustres claustres self-assigned this Oct 24, 2019
@claustres
Copy link
Member Author

Tested on staging environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant