Comments (6)
the arguments you have shown above for monitorserver1 contain an error, namely the node name is spelt wrong in the -initial-cluster. monitorserve2= should be monitorserver2=
be aware that, as per the documentation: "The command line parameters starting with -initial-cluster will be ignored on subsequent runs of etcd"
be sure the cluster is clean by removing the data dir before running with new parameters, once this is done, run 'etcdctl member list' and you should see 2 entries with the corresponding IP addresses - not localhost.
Also be sure that the the IP's can reach each other on the required ports (no firewalls, etc..)
from python-etcd.
Hi.
I tried to modify monitorserve2 to monitorserver2, but it still not work.
etcdctrl member list still shows localhost ips:
[idcuser@docker-itm-agent-dal01 etcd-v2.0.9-linux-amd64]$ ./etcdctl member list
145f81b1e050b7c7: name=monitorserver2 peerURLs=http://127.0.0.1:2380 clientURLs=http://localhost:2379,http://localhost:4001
3260c3386e0bf9d8: name=monitorserver1 peerURLs=http://127.0.0.1:7001 clientURLs=http://localhost:2379,http://localhost:4001
I could ping each other successfully on each machine
And the port is working on each machine.
[10.120.73.86]$ netstat -ano| grep 7001
tcp 0 0 10.120.73.86:7001 0.0.0.0:* LISTEN off (0.00/0/0)
[10.112.206.10]$ netstat -ano|grep 2380
tcp 0 0 10.112.206.10:2380 0.0.0.0:* LISTEN off (0.00/0/0)
on monitorserver1 machine, etcd log as below:
2015/04/12 04:04:18 etcd: no data-dir provided, using default data-dir ./monitorserver1.etcd
2015/04/12 04:04:18 etcd: already initialized as member before, starting as etcd member...
2015/04/12 04:04:18 etcd: listening for peers on http://10.120.73.86:7001
2015/04/12 04:04:18 etcd: listening for client requests on http://localhost:2379
2015/04/12 04:04:18 etcd: listening for client requests on http://localhost:4001
2015/04/12 04:04:18 etcdserver: datadir is valid for the 2.0.1 format
2015/04/12 04:04:18 etcdserver: name = monitorserver1
2015/04/12 04:04:18 etcdserver: data dir = monitorserver1.etcd
2015/04/12 04:04:18 etcdserver: member dir = monitorserver1.etcd/member
2015/04/12 04:04:18 etcdserver: heartbeat = 100ms
2015/04/12 04:04:18 etcdserver: election = 1000ms
2015/04/12 04:04:18 etcdserver: snapshot count = 10000
2015/04/12 04:04:18 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001
2015/04/12 04:04:18 etcdserver: restart member 3260c3386e0bf9d8 in cluster d32407294ef780c at commit index 313
2015/04/12 04:04:18 raft: 3260c3386e0bf9d8 became follower at term 7872
2015/04/12 04:04:18 raft: newRaft 3260c3386e0bf9d8 [peers: [], term: 7872, commit: 313, applied: 0, lastindex: 313, lastterm: 142]
2015/04/12 04:04:18 etcdserver: added member 145f81b1e050b7c7 [http://127.0.0.1:2380] to cluster d32407294ef780c
2015/04/12 04:04:18 raft: newRaft 3260c3386e0bf9d8 [peers: [], term: 7872, commit: 313, applied: 0, lastindex: 313, lastterm: 142]
2015/04/12 04:04:18 etcdserver: added member 145f81b1e050b7c7 [http://127.0.0.1:2380] to cluster d32407294ef780c
2015/04/12 04:04:18 etcdserver: added local member 3260c3386e0bf9d8 [http://127.0.0.1:7001] to cluster d32407294ef780c
2015/04/12 04:04:19 raft: 3260c3386e0bf9d8 is starting a new election at term 7872
2015/04/12 04:04:19 raft: 3260c3386e0bf9d8 became candidate at term 7873
2015/04/12 04:04:19 raft: 3260c3386e0bf9d8 received vote from 3260c3386e0bf9d8 at term 7873
2015/04/12 04:04:19 raft: 3260c3386e0bf9d8 [logterm: 142, index: 313] sent vote request to 145f81b1e050b7c7 at term 7873
2015/04/12 04:04:19 sender: error posting to 145f81b1e050b7c7: dial tcp 127.0.0.1:2380: connection refused
2015/04/12 04:04:19 sender: the connection with 145f81b1e050b7c7 became inactive
2015/04/12 04:04:21 raft: 3260c3386e0bf9d8 is starting a new election at term 7873
2015/04/12 04:04:21 raft: 3260c3386e0bf9d8 became candidate at term 7874
2015/04/12 04:04:21 raft: 3260c3386e0bf9d8 received vote from 3260c3386e0bf9d8 at term 7874
2015/04/12 04:04:21 raft: 3260c3386e0bf9d8 [logterm: 142, index: 313] sent vote request to 145f81b1e050b7c7 at term 7874
2015/04/12 04:04:21 raft: 3260c3386e0bf9d8 received vote from 3260c3386e0bf9d8 at term 7874
2015/04/12 04:04:21 raft: 3260c3386e0bf9d8 [logterm: 142, index: 313] sent vote request to 145f81b1e050b7c7 at term 7874
2015/04/12 04:04:22 raft: 3260c3386e0bf9d8 is starting a new election at term 7874
2015/04/12 04:04:22 raft: 3260c3386e0bf9d8 became candidate at term 7875
2015/04/12 04:04:22 raft: 3260c3386e0bf9d8 received vote from 3260c3386e0bf9d8 at term 7875
on monitorserver2 machine ,etcd log as below:
2015/04/12 04:06:02 etcd: no data-dir provided, using default data-dir ./monitorserver2.etcd
2015/04/12 04:06:02 etcd: already initialized as member before, starting as etcd member...
2015/04/12 04:06:02 etcd: listening for peers on http://10.112.206.10:2380
2015/04/12 04:06:02 etcd: listening for client requests on http://localhost:2379
2015/04/12 04:06:02 etcd: listening for client requests on http://localhost:4001
2015/04/12 04:06:02 etcdserver: datadir is valid for the 2.0.1 format
2015/04/12 04:06:02 etcdserver: name = monitorserver2
2015/04/12 04:06:02 etcdserver: data dir = monitorserver2.etcd
2015/04/12 04:06:02 etcdserver: member dir = monitorserver2.etcd/member
2015/04/12 04:06:02 etcdserver: heartbeat = 100ms
2015/04/12 04:06:02 etcdserver: election = 1000ms
2015/04/12 04:06:02 etcdserver: snapshot count = 10000
2015/04/12 04:06:02 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001
2015/04/12 04:06:02 etcdserver: restart member 145f81b1e050b7c7 in cluster d32407294ef780c at commit index 2124
2015/04/12 04:06:02 raft: 145f81b1e050b7c7 became follower at term 7893
2015/04/12 04:06:02 raft: newRaft 145f81b1e050b7c7 [peers: [], term: 7893, commit: 2124, applied: 0, lastindex: 2124, lastterm: 12]
2015/04/12 04:06:02 etcdserver: added local member 145f81b1e050b7c7 [http://127.0.0.1:2380] to cluster d32407294ef780c
from python-etcd.
@durzo
Please check my comments above.
Thanks for your help
from python-etcd.
2015/04/12 04:06:02 etcd: no data-dir provided, using default data-dir ./monitorserver2.etcd
2015/04/12 04:06:02 etcd: already initialized as member before, starting as etcd member...
You need to remove the data dir in order to create a new cluster.
from python-etcd.
it works. Thanks for your great help
from python-etcd.
please close this issue
from python-etcd.
Related Issues (20)
- There should be a way to prevent python-etcd from appending a slash to key names
- Lock object seems to not provide locking
- Unable to write or read HOT 1
- I can not use ca connect my etcd
- Stale connection
- Just created key can be omitted HOT 1
- how to client a cluster?
- Make a 0.4.6 release HOT 4
- locks with ttls are broken
- EtcdWatchTimedOut does not been raised when occur
- How to pass private SSL key HOT 1
- Make default port 2379
- WIP: porting the package out of the nose dependency
- incompatible version of dnspython HOT 1
- SRV srv_domain parameter is ignored HOT 5
- Cannot import etcd even I have installed python-etcd on my computer. HOT 1
- Does this client support ETCD v3 servers? HOT 1
- Still maintained? HOT 1
- Fix handling of etcd clusters with self-signed certificates
- Any recent release after `0.4.5` in pypi? 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 python-etcd.