Misleading error message mentioning etcdv2 when etcdv3 is unavailable
See original GitHub issueDescribe the bug
The install instructions seem to indicate one should install the python-etcd package for etcd3 support as well; pip install patroni[etcd3] also installs that:
Installing collected packages: python-etcd
Running setup.py install for python-etcd ... done
Successfully installed python-etcd-0.4.5
However, it seems to me, that python-etcd 0.4.5 does not have support for v3, see e.g. https://github.com/jplana/python-etcd/issues/252
Also, if I try to start patroni, I get a reference to v2 even if etcd3 is in DCS:
2021-12-15 16:52:11,264 DEBUG: New etcd client created for https://XXXX:443
2021-12-15 16:52:11,266 DEBUG: Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=0, status=None)
2021-12-15 16:52:11,266 DEBUG: Starting new HTTPS connection (1): XXX:443
2021-12-15 16:52:11,278 DEBUG: https://XXX:443 "GET /version HTTP/1.1" 502 150
2021-12-15 16:53:16,535 ERROR: Failed to get list of machines from https://XXX:443/v2: <Unknown error: '<html>
<head><title>502 Bad Gateway</title></head>
[...]
I checked that manually running ETCDCTL_API=3 etcdctl --endpoints [...] get members works.
Is this a problem on my side, is there some code needed, or is this just a documentation issue?
Environment
- Patroni version: 2.1.2
- PostgreSQL version: n/a
- DCS (and its version): etcd 3.4.3
Patroni configuration file
etcd3:
protocol: "https"
url: "https://XXX:443"
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Interacting with etcd
Users mostly interact with etcd by putting or getting the value of a key. This section describes how to do that by using...
Read more >How to fix etcd cluster misconfigured error
Although in this case below it appears that etcd is listening on 127.0.0.1 port 2379 it is unclear to me where the etcdctl...
Read more >openshift-ansible-3.11.24-1.git.0.f09859e.el7 | Build Info
... disable keep ns on error in ASB to prevent resource starvation ... default to False (rteague@redhat.com) - Add default node groups to ......
Read more >Troubleshooting etcd Nodes | Rancher Manager
605a124503b9 rancher/coreos-etcd:v3.2.18 "/usr/local/bin/et. ... Related error messages are etcdserver: mvcc: database space exceeded or ...
Read more >Error client etcd cluster is unavailable or misconfigured
How to fix - Error client etcd cluster is unavailable or misconfigured. Feb 22, 2021 · 4 min read · Kubespray ·. Share...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not necessarily. etcdctl uses gRPC directly, but Patroni have no other choice as relying on JSON gRPC gateway, which seems to be not enabled by default when etcd uses config file. Ref: https://github.com/etcd-io/etcd/issues/12093
Ok, thanks for the explanation (and sorry for the late reply); it took me hours of debugging trying to figure out why it was using v2 so I think it would be useful to make this error clearer, I’ve renamed the issue title accordingly