I am trying to take a demo file to get an API use the python-etcd lib. The details below:
import etcd
cat test.py
client = etcd.Client(
host='10.110.0.46',
port=2379,
protocol='https',
cert=('etcd-client.pem','etcd-client-key.pem'),
ca_cert='ca.pem',
username='root',
password='next@2015',
)
print client.get('/test/testmessage').value
but I running the demo.py, it show me
Traceback (most recent call last):
File "test.py", line 14, in
print client.get('/test/testmessage').value
File "/usr/lib/python2.7/site-packages/etcd/client.py", line 740, in get
return self.read(key)
File "/usr/lib/python2.7/site-packages/etcd/client.py", line 597, in read
timeout=timeout)
File "/usr/lib/python2.7/site-packages/etcd/client.py", line 893, in wrapper
cause=e
etcd.EtcdConnectionFailed: Connection to etcd failed due to SSLError(CertificateError("hostname '10.110.0.46' doesn't match u'etcd'",),)
the hostname should be fine.
Please give me some suggestion if someone care it.
I am trying to take a demo file to get an API use the python-etcd lib. The details below: import etcd cat test.py client = etcd.Client( host='10.110.0.46', port=2379, protocol='https', cert=('etcd-client.pem','etcd-client-key.pem'), ca_cert='ca.pem', username='root', password='next@2015', )
print client.get('/test/testmessage').value
but I running the demo.py, it show me
Traceback (most recent call last): File "test.py", line 14, in
print client.get('/test/testmessage').value
File "/usr/lib/python2.7/site-packages/etcd/client.py", line 740, in get
return self.read(key)
File "/usr/lib/python2.7/site-packages/etcd/client.py", line 597, in read
timeout=timeout)
File "/usr/lib/python2.7/site-packages/etcd/client.py", line 893, in wrapper
cause=e
etcd.EtcdConnectionFailed: Connection to etcd failed due to SSLError(CertificateError("hostname '10.110.0.46' doesn't match u'etcd'",),)
the hostname should be fine.
Please give me some suggestion if someone care it.