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

cant connect to an elastic cluster with ssl cert thats self generated #533

Open
obsd-guru opened this issue Feb 8, 2021 · 4 comments
Open

Comments

@obsd-guru
Copy link

General information

running elastichq as a container in an k8s enviroment, running " elastichq/elasticsearch-hq" from dockerhub.

Issue Description

access Elastic Cluster with no SSL : works
access Elastic Cluster with valid SSL : works
access Elastic Cluster with self-signed SSL : doenst work
HQ_VERIFY_CERTS is set to False

Source Code / Logs

in the logs are lines like

Message: 'Unable to create connection to: https://10.10.10.10:9200'
Arguments: (SSLError(MaxRetryError("HTTPSConnectionPool(host='10.10.10.10', port=9200): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))",),),)

Be Patient

i will, but still looking forward for any tips ;)

@mwinters0
Copy link

I came here to report similar. Running with docker run -it --rm -p 5000:5000 -e HQ_VERIFY_CERTS=False elastichq/elasticsearch-hq and seeing the above error.

@Ohlnielsen
Copy link

I am no expert at this, but this solved my similar issue (adding the enable SSL variable):
docker run --rm -p 5000:5000 -e "HQ_ENABLE_SSL=True" -e "HQ_VERIFY_CERTS=False" elastichq/elasticsearch-hq

Connected successfully to elasticsearch (from ElasticHQ webpage) using https://[ip]:9200

@sangdrax8
Copy link

I have tried passing this variable, and still have issues connectiong. Since the only error is "bad certificate" I would guess it is still trying to verify the self signed cert.

@hummermania
Copy link

Connect to ES cluster with self-signed certificates successfully.

Write environment file on any path:

HQ_VERIFY_CERTS=False
HQ_DEFAULT_URL=https://[HOST]:9200/
HQ_CA_CERTS=/path/to/ca.pem <= Issuer CA
HQ_ENABLE_SSL=True

And run container using env file:
docker run --env-file /path/to/env -p 5000:5000 elastichq/elasticsearch-hq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants