# Kibana cannot connect to elastichsearch in https, xpack enabled

**URL:** https://discuss.elastic.co/t/kibana-cannot-connect-to-elastichsearch-in-https-xpack-enabled/286692
**Category:** Kibana
**Created:** [October 14, 2021, 8:20am UTC](https://discuss.elastic.co/t/kibana-cannot-connect-to-elastichsearch-in-https-xpack-enabled/286692 "2021-10-14T08:20:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Florent\_BITSCHY](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/florent_bitschy/32/95861_2.png) [@Florent\_BITSCHY](https://discuss.elastic.co/u/Florent_BITSCHY)
#### Post date: [October 14, 2021, 8:20am UTC](https://discuss.elastic.co/t/kibana-cannot-connect-to-elastichsearch-in-https-xpack-enabled/286692/1 "2021-10-14T08:20:08Z")

</div>

hello

i deploy elastci stack in kubernetes with helm chart  
i got my elastcisearch runnning with xpack and running well

here uis the values

node.master: true  
replicas: 1  
minimumMasterNodes: 1  
clusterHealthCheckParams: 'wait\_for\_status=yellow&timeout=1s'  
readinessProbe:  
failureThreshold: 3  
initialDelaySeconds: 10  
periodSeconds: 10  
successThreshold: 3  
timeoutSeconds: 5

protocol: https

esConfig:  
Elasticsearch.yml: |  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: certificate  
xpack.security.transport.ssl.keystore.path: /usr/share/Elasticsearch/config/certs/elastic-stack-ca.p12  
xpack.security.transport.ssl.truststore.path: /usr/share/Elasticsearch/config/certs/elastic-stack-ca.p12  
xpack.security.http.ssl.enabled: true  
xpack.security.http.ssl.truststore.path: /usr/share/Elasticsearch/config/certs/elastic-stack-ca.p12  
xpack.security.http.ssl.keystore.path: /usr/share/Elasticsearch/config/certs/elastic-stack-ca.p12  
xpack.security.authc.realms.native.local.order: 0

extraEnvs:

- name: ELASTIC\_PASSWORD  
valueFrom:  
secretKeyRef:  
name: elastic-credentials  
key: password
- name: ELASTIC\_USERNAME  
valueFrom:  
secretKeyRef:  
name: elastic-credentials  
key: username

secretMounts:

- name: elastic-certificates  
secretName: elastic-certificates  
path: /usr/share/Elasticsearch/config/certs

then i try to connect kibana

values :

secretMounts:

- name: elastic-certificate-pem  
secretName: elastic-certificate-pem  
path: /usr/share/kibana/config/certs  
kibanaConfig:  
kibana.yml: |  
Elasticsearch.hosts: ["[https://elastic.cyberpeaceinstitute.network:9200/](https://elastic.cyberpeaceinstitute.network:9200/)" ]

i got this error on kibana :

"message":"Unable to retrieve version information from Elasticsearch nodes. socket hang up"}

and in Elasticsearch :

{"type": "server", "timestamp": "2021-10-14T08:18:16,407Z", "level": "WARN", "component": "o.e.x.s.t.n.SecurityNetty4HttpServerTransport", "cluster.name": "Elasticsearch", "node.name": "Elasticsearch-master-0", "message": "received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/10.25.3.245:9200, remoteAddress=/10.25.3.39:41280}", "cluster.uuid": "d8t801T\_RjKy0j11ErmA3A", "node.id": "fsj52VA8TCGvRml5N\_ckGA" }

it looks like the connection is in clear , but in my kibana conf it is in https

when i do a curl in the kibana pod to get the elesticsearhc i gor no error !!!!

thanks for your help

---

<div class="post-metadata">

### Author: ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)
#### Post date: [October 18, 2021, 9:31am UTC](https://discuss.elastic.co/t/kibana-cannot-connect-to-elastichsearch-in-https-xpack-enabled/286692/2 "2021-10-18T09:31:03Z")

</div>

> [@Florent\_BITSCHY](#):
>
> Elasticsearch.hosts: ["[https://elastic.cyberpeaceinstitute.network:9200/](https://elastic.cyberpeaceinstitute.network:9200/)" ]  
> Elasticsearch.ssl.certificateAuthorities: /usr/share/kibana/config/certs/elastic-certificate.pem  
> Elasticsearch.ssl.verificationMode: certificate  
> Elasticsearch.username: "xxxxx"  
> Elasticsearch.password: "xxxx"

I'm surprised that Kibana even starts - `yaml` is case sensitive, and you should have `elasticsearch.*` settings in lowercase as all other settings (not sure if it's somehow normalized in k8s setup though).

Can you try to use lowercase everywhere?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 15, 2021, 9:31am UTC](https://discuss.elastic.co/t/kibana-cannot-connect-to-elastichsearch-in-https-xpack-enabled/286692/3 "2021-11-15T09:31:32Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
