Comments (4)
Yeah, I've had dig
not work before. Usually host
or getent
or something similar will. You should find something that works and replace that script with that works in your containers on the VM. Then, everything should be fine.
Also, have you considered moving to Kubernetes? There is no need for Consul in Kubernetes.
from docker-alpine.
tks you! I run docker-compose first and run a script after that. The script show list ip of consul from the container outside ( base on docker-inspect
) and export to text file. The text file is used to volumes
from outside to /root/usr/bin/
inside container. I changed container-find
file -> read the text file.
This my way. I cant show list ip from inside container with dig
, getent
, host
, ... at my server (Debian Virtual Machine).
Can you help me another better way! Tks you!
from docker-alpine.
when i changed dig
to getent ahosts ${1:-$CONSUL_SERVER_NAME} | awk '{print $1}' | awk 'NR % 2'
at local
i receive list ip same dig
/ # getent ahosts ${1:-$CONSUL_SERVER_NAME} | awk '{print $1}' | awk 'NR % 2'
172.18.0.9
172.18.0.8
172.18.0.5
/ # dig +short ${1:-$CONSUL_SERVER_NAME}
172.18.0.8
172.18.0.9
172.18.0.5
/ #
BUT Consul NOT working
2018/05/17 01:22:35 [INFO] raft: Election won. Tally: 1
2018/05/17 01:22:35 [INFO] raft: Node at 172.18.0.9:8300 [Leader] entering Leader state
2018/05/17 01:22:35 [INFO] consul: cluster leadership acquired
2018/05/17 01:22:35 [INFO] consul: New leader elected: e0d5eecc154a
2018/05/17 01:22:35 [INFO] consul: member '39a08603c401' joined, marking health alive
2018/05/17 01:22:35 [INFO] consul: member 'e0d5eecc154a' joined, marking health alive
2018/05/17 01:22:35 [ERR] consul: 'ba7e4254ead0' and 'f782fa5e353f' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:22:35 [INFO] consul: member 'ba7e4254ead0' joined, marking health alive
2018/05/17 01:22:35 [ERR] consul: '97368f1f55c0' and 'e0d5eecc154a' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:22:35 [INFO] consul: member '97368f1f55c0' joined, marking health alive
2018/05/17 01:22:35 [INFO] agent: Synced service 'consul'
2018/05/17 01:22:35 [ERR] consul: 'f782fa5e353f' and 'e07b1d5ff119' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:22:35 [INFO] consul: member 'f782fa5e353f' joined, marking health alive
2018/05/17 01:22:35 [ERR] consul: 'e07b1d5ff119' and 'f0cf753f5b09' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:22:35 [INFO] consul: member 'e07b1d5ff119' joined, marking health alive
2018/05/17 01:22:35 [ERR] consul: 'f0cf753f5b09' and 'e0d5eecc154a' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:22:35 [INFO] consul: member 'f0cf753f5b09' joined, marking health alive
2018/05/17 01:22:35 [INFO] consul: New leader elected: 97368f1f55c0
2018/05/17 01:22:36 [INFO] consul: New leader elected: f0cf753f5b09
2018/05/17 01:22:36 [INFO] consul: New leader elected: f782fa5e353f
2018/05/17 01:22:36 [INFO] consul: New leader elected: e07b1d5ff119
2018/05/17 01:23:35 [ERR] consul: 'f782fa5e353f' and '97368f1f55c0' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:23:35 [ERR] consul: 'e07b1d5ff119' and 'e0d5eecc154a' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:23:35 [ERR] consul: 'f0cf753f5b09' and 'e0d5eecc154a' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:23:35 [ERR] consul: 'ba7e4254ead0' and 'e0d5eecc154a' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
2018/05/17 01:23:35 [ERR] consul: '97368f1f55c0' and 'e07b1d5ff119' are both in bootstrap mode. Only one node should be in bootstrap mode, not adding Raft peer.
from docker-alpine.
Are you familiar with how Consul works?
You could try setting CONSUL_BOOTSTRAP_DEBUG
to true
and then review the log file at /var/log/consul-bootstrap/consul-bootstrap.log
. This documents decisions made by the custom Consul bootstrapping functionality within these containers.
Also, have a read of https://github.com/smebberson/docker-alpine#consul-and-service-discovery and review the example. See if you can get that to work.
from docker-alpine.
Related Issues (20)
- alpine-apache doesn't start, could not create PID file HOT 1
- Consul service not running in smebberson/alpine-consul-nodejs HOT 6
- consul cluster bootstrap not working in alpine-consul:3.1.1 HOT 1
- alpine + consul + openjdk image
- d ~
- Nginx Versions HOT 5
- Support storage back ends that do not support extended file attributes HOT 4
- Standardised approach to logging HOT 2
- Removal of exposed ports HOT 2
- Unable to use the `run` scripts in each directory under examples/ HOT 6
- RabbitMQ not allowing bind IP HOT 2
- Unable to build alpine-base image HOT 4
- csh shell available? HOT 1
- unable to connect to node rabbit@rabbitmq: nodedown HOT 3
- Container immediately shuts down after start apline-apache
- line python
- Join cluster in LAN network
- dnsmasq change nameserver HOT 1
- failed to start go-dnsmasq on port 53 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-alpine.