Facing connection closer error while starting elasticsearch 8.5.1 instance on local machine

First. Don't use this version. It's a bit old. Better to start with the latest 8.13 as you are running all that locally.
BTW, I'd use docker compose as it's much easier to run all that locally.

Most likely you are using self-signed certificates (by default). So you need to tell Kibana about this. Have a look at Start the Elastic Stack with security enabled automatically | Elasticsearch Guide [8.13] | Elastic

1 Like