kragniz / python-etcd3

Python client for the etcd API v3
Apache License 2.0
429 stars 183 forks source link

etcd3 does not connect to 3.5.0 server but etcd does #1900

Open crmpicco opened 2 years ago

crmpicco commented 2 years ago

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      
steve-solun commented 2 years ago

@crmpicco did you manage to fix it? I am in the same situation, even worse, I am on Mac M1 and if I will install the package it won't let me to import it due to protobuf and if I am using docker - it says port conflict.