Comments (8)
To anyone who finds this issue, setting -data-dir /tmp/consul
in your consul command: will resolve the issue.
from docker-consul.
Ok it seems that if I restart it like this
$ fig stop
$ fig rm
$ fig up
It works.
from docker-consul.
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 upIt works.
—
Reply to this email directly or view it on GitHub
#35 (comment)
.
Jeff Lindsay
http://progrium.com
from docker-consul.
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.
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.
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.
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.
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)
- error: No cluster leader when reboot HOT 4
- Build 0.6.3 - server HOT 4
- Consul container immediately shuts down HOT 5
- Failed to heartbeat after deliberately killing cluster leader
- Docker Hub failed to build consul-server and consul-agent against 0.6.4 HOT 4
- consul on swarm multi-node
- Tag for 0.6.4
- docker consul-server not exposing port HOT 3
- Docker deployment of services, can not modify the registered address of docker-consul
- Docker deployment of services, can not modify the registered address of docker-consul
- Add a DEPRECATION notice HOT 2
- Add nc to image?
- Error 500 when accesing web UI
- [ERR] agent: failed to sync remote state: No cluster leader
- I wonder if any notes on how to consul supports scalability HOT 1
- Dockerfiles not exposing ports
- How to configure the docker-consul for security ?
- CONSUL_BIND_INTERFACE not working?
- advertise flag ignored HOT 1
- Need help with "docker swarm init" and Consul HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-consul.