Patroni выдает ошибку сертификата при попытке доступа к защищенному (https) консулу - PullRequest
0 голосов
/ 10 апреля 2020

Я пытаюсь запустить patroni, но получаю следующую ошибку:

Traceback (most recent call last):
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/patroni/utils.py", line 330, in __call__
    return func(*args, **kwargs)
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/patroni/dcs/consul.py", line 283, in _do_refresh_session
    lock_delay=0.001, behavior='delete')
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/consul/base.py", line 1764, in create
    data=data)
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/patroni/dcs/consul.py", line 118, in wrapper
    return callback(self.response(self.http.request(method.upper(), self.uri(path, params), **kwargs)))
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/urllib3/request.py", line 80, in request
    method, url, fields=fields, headers=headers, **urlopen_kw
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/urllib3/request.py", line 171, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 330, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/var/lib/postgresql/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='consul.custom-orig.com', port=443): Max retries exceeded with url: /v1/session/create (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

Похоже, что он не может создать сеанс с нашим Consul, который использует https

Есть идеи, как это исправить?

...