Giter VIP home page Giter VIP logo

Comments (8)

nijikokun avatar nijikokun commented on August 18, 2024 2

To anyone who finds this issue, setting -data-dir /tmp/consul in your consul command: will resolve the issue.

from docker-consul.

srobertson avatar srobertson commented on August 18, 2024

Ok it seems that if I restart it like this

$ fig stop
$ fig rm
$ fig up

It works.

from docker-consul.

progrium avatar progrium commented on August 18, 2024

Not sure why that would do it. This works consistently?

On Mon, Nov 10, 2014 at 1:56 PM, Scott Robertson [email protected]
wrote:

Ok it seems that if I restart it like this

$ fig stop
$ fig rm
$ fig up

It works.


Reply to this email directly or view it on GitHub
#35 (comment)
.

Jeff Lindsay
http://progrium.com

from docker-consul.

mileswilson avatar mileswilson commented on August 18, 2024

It does it because fig just restarts the containers, and doesn't recreate them unless you tell it to.

Docker will bring the machines up on new IP addresses - and the existing consul state from the first run tells it to look for cluster mates that no longer exist.

from docker-consul.

chr0n1x avatar chr0n1x commented on August 18, 2024

I think that this is something that should be addressed in fig. I'm not quite sure what would have to be done on their end though...

from docker-consul.

rkettelerij avatar rkettelerij commented on August 18, 2024

Encountered this too and I can confirm removing containers (using docker-compose rm) works. It's unfortunate we need this though.

@mileswilson mentions docker compose just restarts containers but doesn't recreate them. At least in the latest version of docker-compose the opposite is true. docker-compose up will recreate containers unless --no-recreate is passed as an argument. Nevertheless this doesn't change the issue at all since consul's cluster state still appears to be stale and only running docker-compose rm first resolves the issue.

from docker-consul.

andyshinn avatar andyshinn commented on August 18, 2024

This is just the way that Consul works. The state (containing the correct IP address of Consul self) is persisted because docker-compose does not remove the container. When the container is restarted, it has a new IP address. This would be a feature request for docker-compose.

from docker-consul.

ShaneDrury avatar ShaneDrury commented on August 18, 2024

A quick fix is also to remove peers.json, especially if you've mounted a data volume. Say your data volume is mounted at /mnt/consul, just remove /mnt/consul/raft/peers.json when consul has been stopped and it should re-establish communications.

from docker-consul.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.