# Facing error while starting kibana & trying to connect to elasticsearch version 8.5.1

**URL:** <https://discuss.elastic.co/t/facing-error-while-starting-kibana-trying-to-connect-to-elasticsearch-version-8-5-1/359884>\
**Category:** Kibana\
**Tags:** elastic-stack-monitoring, elastic-stack-security, elastic-stack-alerting\
**Created:** [May 21, 2024, 7:33am UTC](https://discuss.elastic.co/t/facing-error-while-starting-kibana-trying-to-connect-to-elasticsearch-version-8-5-1/359884 "2024-05-21T07:33:31Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Sunil\_Jagtap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunil_jagtap/32/133604_2.png) [@Sunil\_Jagtap](https://discuss.elastic.co/u/Sunil_Jagtap)\
**Post date:** [May 22, 2024, 5:31am UTC](https://discuss.elastic.co/t/facing-error-while-starting-kibana-trying-to-connect-to-elasticsearch-version-8-5-1/359884/7 "2024-05-22T05:31:19Z")

</div>

Hi All,

I am referring this post which is more relevant to my issue,

> [@Kibana - Unable to retrieve version information from Elasticsearch nodes. self signed certificate in certificate chain](https://discuss.elastic.co/t/kibana-unable-to-retrieve-version-information-from-elasticsearch-nodes-self-signed-certificate-in-certificate-chain/299159/3):
>
> If you want to use the enrollment process, then you should not make configuration changes to your kibana.yml but let the enrollment process handle this for you. Remove elasticsearch.hosts: ["https://10.0.2.15:9200"] and start the kibana service again. When you navigate to [http://localhost:5601/](http://localhost:5601/) you will be prompted to enter the enrollment token you generated in Elasticsearch ( please generate a new one, each enrollment token is only valid for 30 minutes)

In my case I am using kibana plugin development environment & when I am trying to invoke enrollment process process using "yarn start" it is taking me to below error on kibana terminal :

```auto
[2024-05-22T10:52:31.044+05:30][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. socket hang up - Local: 127.0.0.1:60140, Remote: 127.0.0.1:9200

```

As per documentation : [Start the Elastic Stack with security enabled automatically | Elasticsearch Guide [8.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-stack-security.html#stack-start-with-security)

I tried below step :

- **Detached mode** (non-browser)Run the `kibana-setup` tool and pass the generated enrollment token with the `--enrollment-token` parameter.

bin/kibana-setup --enrollment-token

As "bin/kibana-setup" not exist on kibana plugin development environment I tried executing the script manually from location :

```auto
Sunils-MacBook-Pro:scripts sunil$ pwd
/Users/sunil/Documents/workspace/kibana/src/dev/build/tasks/bin/scripts

Sunils-MacBook-Pro:scripts sunil$ ./kibana-setup --enrollment-token [ENCRYPTED_TEXT]
**unable to find usable node.js executable.**

```

Looking for help, thanks in advance.

---

_[View the full topic](https://discuss.elastic.co/t/facing-error-while-starting-kibana-trying-to-connect-to-elasticsearch-version-8-5-1/359884)._
