-
Notifications
You must be signed in to change notification settings - Fork 33
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
Sync is failling when no agents stored in cache #191
Comments
It's not true. Sync is first task marathon-consul does after start. If there is no marathon-consul's task in Marathon then agents cache will not be populated and this error will happen. We can solve it by adding |
how to add --consul-agent-location parameter? |
It needs to be added in |
Hey, I am getting tripped up by this as well. I have marathon-consul running as a Marathon task with the following args: I can see the Marathon events coming into the logs but the corresponding marathon apps are not being registered or de-registered in consul. Here are the error messages I get: Syncing services started
Also, consul is receiving Any ideas? --John |
@hokiegeek2 Marathon-Conusl will not register task (and populate agents cache) if task is has not |
@janisz Thanks so much for responding so quickly! I really appreciate it. This looks like a great tool and I am looking forward to getting it running correctly. I apologize, I should have been more precise in my question. I have one marathon task labeled When I start the jupyterhub-nginx in Marathon I get two messages in the marathon-consul logs:
In Consul I see the node I am launching the Marathon task on is listed node with an agent health status of "Agent alive and reachable", but I don't see my task So the marathon events are being sent to and acknowledged by marathon-consul, but the corresponding marathon tasks are not being registered with Consul. --John |
@hokiegeek2 Your task is not registered because marathon-consul registers only when task becomes healthy. Did you specify health check for task? |
@janisz Yay! That was it! Many apologies for missing this in the docs. Thanks! --John |
No problem. Created issue for updating the readme #221 |
In some cases consul agents cache could be empty. This chagne allow providing consul agent hostname to initially populate the cache. Fixes: #191
In some cases consul agents cache could be empty. This chagne allow providing consul agent hostname to initially populate the cache. Fixes: #191
In some cases consul agents cache could be empty. This chagne allow providing consul agent hostname to initially populate the cache. Fixes: #191
总的来说这并不是consul-marathon开发的问题,而是因为说明文档中没有详细的原理说明导致的。我有时间弄个图就清楚了 |
@xueyi28 我不会说中文 |
In rare cases when marathon-consul is commencing sync there could be no agents available in the cache. For example just after start-up.
It results in following error:
And sync is dropped.
This is happening because agent cache is fed on registrations and de-registrations. While sync at the beginning is calling for list of applications and to do that agent cache must not be empty.
Summarizing: no register/de-register before sync -> marathon-consul will fail on sync.
To resolve, we could place consul-master in configuration as a fall-back agent-replacement and use in the case of nil cache.
The text was updated successfully, but these errors were encountered: