kragniz / kragniz/python-etcd3
etcd3 does not connect to 3.5.0 server but etcd does
- Dominant language
- Python
- Stars
- 450
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to work out why my usage of `etcd3` in my Python 3 application does not connect to the etcd server, however using `etcd` does.
My server is 3.5.0:
```
curl -L http://127.0.0.1:4001/version
{"etcdserver":"3.5.0","etcdcluster":"3.5.0"}
```
When I try connecting with `etcd3`, I get the following "etcd connection failed" error:
```
python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import etcd3
>>> client = etcd3.client(host='127.0.0.1', port=4001)
>>> client.get('/courses/crmpicco-sf440/sss')
etcd3.exceptions.ConnectionFailedError: etcd connection failed
```
However, when I do the same with `etcd` it works. 😕
```
python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import etcd
>>> client = etcd.Client(host='127.0.0.1', port=4001)
>>> scratch = client.read("/courses/crmpicco-sf440/sss").value
>>> print(scratch)
71
```
```
pip3 list | grep etcd
etcd3 0.12.0
python-etcd 0.4.5
```
Contributor guide
Research direction
Reproduce the failure with Python 3.8, etcd3 0.12.0, and an etcd 3.5.0 server using `etcd3.client(host='127.0.0.1', port=4001)` followed by `client.get(...)`. Compare that path with the working `python-etcd` request and inspect the client connection and get entry points. Done means the reported etcd3 request connects and returns the existing value against the 3.5.0 server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100