0

我正在尝试从一些 Python 3.9 代码中读取 etcd 密钥。

http://localhost:2379 "GET /v2/keys/sites/crmpicco/database HTTP/1.1" 404 19
WARNING - etcd response did not contain a cluster ID
etcd.EtcdException: Bad response : 404 page not found

我在用python-etcd==0.4.5

看起来错误是从这里抛出的,但我看不到我在配置中错过了什么。

etcd --version 
etcd Version: 3.5.1
Git SHA: d42e8589e
Go Version: go1.17.2
Go OS/Arch: darwin/amd64

etcdctl member list    
8e9e05c52164694d, started, default, http://localhost:2380, http://localhost:2379, false
etcdctl endpoint health
127.0.0.1:2379 is healthy: successfully committed proposal: took = 9.880168ms

我可以很好地从 CLI 设置和获取:

etcdctl put crmpicco1872 "55"     
OK
etcdctl get crmpicco1872  
crmpicco1872
55
4

0 回答 0