Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when connect etcd-3.4.7, etcd3-py dont work #135

Open
gitbeyond opened this issue May 12, 2020 · 2 comments
Open

when connect etcd-3.4.7, etcd3-py dont work #135

gitbeyond opened this issue May 12, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@gitbeyond
Copy link

  • etcd3-py version: 0.1.6
  • Python version: 3.6.8
  • Operating System: Centos7.8

Description

from etcd3 import Client

etcd_cert="/etcd/ansible_etcd_certs/etcd-client-ca.pem"
etcd_cert_key="/etcd/ansible_etcd_certs/etcd-client-ca-key.pem"
etcd_ca_cert="/etcd/ansible_etcd_certs/etcd-root-ca.pem"

client = Client(host='172.16.27.4',port=2379,protocol='https',cert=(etcd_cert, etcd_cert_key), verify=etcd_ca_cert,  server_version='3.4.7', cluster_version='3.4.0')
print(client.version())
print(client.put('foo','bar'))

error

EtcdVersion(etcdserver='3.4.7', etcdcluster='3.4.0')
Traceback (most recent call last):
  File "test_etcd.py", line 9, in <module>
    print(client.put('foo','bar'))
  File "/data/apps/opt/etcd3-client/lib64/python3.6/site-packages/etcd3/apis/kv.py", line 106, in put
    return self.call_rpc(method, data=data)
  File "/data/apps/opt/etcd3-client/lib64/python3.6/site-packages/etcd3/client.py", line 202, in call_rpc
    self._raise_for_status(resp)
  File "/data/apps/opt/etcd3-client/lib64/python3.6/site-packages/etcd3/client.py", line 150, in _raise_for_status
    raise get_client_error(error, code, status, resp)
etcd3.errors.go_etcd_rpctypes_error.ErrUnknownError: <ErrUnknownError error:'all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: authentication handshake failed: remote error: tls: bad certificate"', code:14>
@Revolution1
Copy link
Owner

haven't test it on newest etcd. Gonna take a look

@Revolution1 Revolution1 added the bug Something isn't working label May 12, 2020
@zhenglilei
Copy link

python test_etcd_reading.py
EtcdVersion(etcdserver='3.4.7', etcdcluster='3.4.0')
Traceback (most recent call last):
File "test_etcd_reading.py", line 5, in
print(cli.range('test'))
File "/.conda/envs/crabs/lib/python3.6/site-packages/etcd3/utils.py", line 251, in inner
return fn(*args, **kwargs)
File "/.conda/envs/crabs/lib/python3.6/site-packages/etcd3/apis/kv.py", line 203, in range
return self.call_rpc(method, data=data)
File "/.conda/envs/crabs/lib/python3.6/site-packages/etcd3/client.py", line 202, in call_rpc
self._raise_for_status(resp)
File "/.conda/envs/crabs/lib/python3.6/site-packages/etcd3/client.py", line 150, in _raise_for_status
raise get_client_error(error, code, status, resp)
etcd3.errors.go_etcd_rpctypes_error.ErrUnknownError: <ErrUnknownError error:'404 page not found', code:2>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants