python-etcd3 icon indicating copy to clipboard operation
python-etcd3 copied to clipboard

etcd3 does not connect to 3.5.0 server but etcd does

Open crmpicco opened this issue 3 years ago • 1 comments

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      

crmpicco avatar Jun 10 '22 09:06 crmpicco

@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.

steve-solun avatar Oct 10 '22 20:10 steve-solun