Comments (4)
BTW, when I run client.machines. It will output
machines [u'http://localhost:2379', u'http://localhost:2379', u'http://localhost:4001', u'http://localhost:4001']
Seems it still find cluster machines from localhost.
from python-etcd.
This seems to be a cluster config issue. I have seen what you are experiencing before with a misconfigured cluster. Try re-creating the cluster being sure to specify the peer and client listen addresses as network reachable addresses (not localhost)
I have python-etcd from master branch working with etcd-v2.0.9 just fine:
durzo@test:~/etcd-v2.0.9-linux-amd64$ ./etcd
2015/04/08 22:22:41 etcd: no data-dir provided, using default data-dir ./default.etcd
2015/04/08 22:22:41 etcd: listening for peers on http://localhost:2380
2015/04/08 22:22:41 etcd: listening for peers on http://localhost:7001
2015/04/08 22:22:41 etcd: listening for client requests on http://localhost:2379
2015/04/08 22:22:41 etcd: listening for client requests on http://localhost:4001
durzo@test:~$ cat etcd-2.0.9.py
#!/usr/bin/python
import etcd
client = etcd.Client(host='127.0.0.1', port=4001, protocol='http', allow_redirect=True, read_timeout=None)
print "Write: %s" % client.write('/test', "testing")
print "Read: %s" % client.read('/test').value
durzo@test:~$ ./etcd-2.0.9.py
Write: <class 'etcd.EtcdResult'>({'newKey': True, 'raft_index': 76, '_children': [], 'createdIndex': 3, 'modifiedIndex': 3, 'value': u'testing', 'etcd_index': 3, 'expiration': None, 'key': u'/test', 'ttl': None, 'action': u'set', 'dir': False})
Read: testing
from python-etcd.
@durzo
Hi, do you know how to config a etcd cluster?
I follow the etcd instruction ,and run following command on each machine, but it doesn't work:
/home/idcuser/HATest/etcd-v2.0.9-linux-amd64/etcd -name monitorserver1 -listen-peer-urls http://10.120.73.86:7001 -listen-client-urls http://10.120.73.86:4001 -initial-cluster-token monitorserver-cluster -initial-advertise-peer-urls http://10.120.73.86:7001 -initial-cluster monitorserver1=http://10.120.73.86:7001,monitorserve2=http://10.112.206.10:2380 -initial-cluster-state new &>> /home/idcuser/HATest/etcd.log &
/home/idcuser/HATest/etcd-v2.0.9-linux-amd64/etcd -name monitorserver2 -listen-peer-urls http://10.112.206.10:2380 -listen-client-urls http://10.112.206.10:2379 -initial-cluster-token monitorserver-cluster -initial-advertise-peer-urls http://10.112.206.10:2380 -initial-cluster monitorserver1=http://10.120.73.86:7001,monitorserver2=http://10.112.206.10:2380 -initial-cluster-state new &>> /home/idcuser/HATest/etcd.log &
from python-etcd.
seems like a config issue
from python-etcd.
Related Issues (20)
- lock.aquire fall into infinite loop HOT 2
- 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 2
- 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
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.