Comments (4)
Can you add a sample code that would reproduce this?
I'm not sure the problem is where you are thinking it is.
from python-etcd.
Ok the bug occurs when you have an incorrect port.
host_list = (
('host1', 4000), # incorrect port
('host2', 4001), # never gets here because TimeoutError not caught and handled
)
c = Client(host=host_list, read_timeout=5, allow_reconnect=True, allow_redirect=True)
from python-etcd.
So... if you have an incorrect configuration you get an exception. Not that strange, but I'll try to handle that gracefully - it's not easy, as a TimeoutError can happen also because you reached the urllib request timeout.
from python-etcd.
Also, trying to reproduce your bug, I get a different (as expected) error - urllib3.exceptions.MaxRetryError just when I try to instantiate etcd.Client
>>> host_list = ( ('127.0.0.1', 4000), ('127.0.0.1', 4001) )
>>> c = etcd.Client(host=host_list, read_timeout=5, allow_reconnect=True, allow_redirect=True)
[CUT]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=4000): Max retries exceeded with url: /v2/machines (Caused by ProtocolError('Connection aborted.', error(111, 'Connection refused')))
Which is a perfectly fine way to fail in my opinion, but I can handle that gracefully I guess.
Still, this is not the problem you reported, so...
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.