containerpilot: Member has conflicting node ID
I have several services running with ContainerPilot, for one of them, I have the following error when it runs, which prevents the local consul agent to register to the consul server.
* Failed to join 172.18.0.2: Member '4b7d8eea9a88' has conflicting node ID '7ba08ece-d74e-4b39-b5fb-c9b18a396864' with this agent's ID
Seems this can be solved by fixing the node id when running the consul agent: https://github.com/hashicorp/consul/issues/2877
How would you recommend to set the node-id in the consul subprocess ?
{
"command": ["/usr/local/bin/consul", "agent",
"-node-id", "something like $(cat /proc/sys/kernel/random/uuid)", ?
"-data-dir=/data",
"-config-dir=/config",
"-rejoin",
"-retry-join", "{{ if .CONSUL }}{{ .CONSUL }}{{ else }}consul{{ end }}",
"-retry-max", "10",
"-retry-interval", "10s"],
"restarts": "unlimited"
}
Thanks a lot.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 26 (11 by maintainers)
You can pass “-disable-host-node-id” to the consul (>0.8.1) run command to make it generate a random node-id. It can’t be reproduced on Triton, as it is a Consul-Docker issue.
Cheers
Probably kind of related topic: https://groups.google.com/forum/#!topic/consul-tool/9lm0HbyQVd4