Jack
Jack

Reputation: 71

Why Doesn't Elasticsearch connect to LocalHost:9200?

thanks for your help.

I downloaded Elastic Search and in the terminal of my mac, it says that the status is green.

green status terminal

But if I type in to my browser: localhost:9200 it says "the connection was reset" on Firefox and "This page isn’t workinglocalhost didn’t send any data. ERR_EMPTY_RESPONSE" on Chrome.

Kibana also downloaded correctly and I was able to get into the localhost:5601 no problem where I can see the ES interface I think I am supposed to see.

Why can't I access localhost:9200? I tried this in jupyter and got a false return: Jupyter

Maybe there is a hint right here in the terminal shortly after the status changed from yellow to green? lines of code that say WARN keep repeating... Warn terminal?

Could really use some help on this please, am a total noob with ES but really want to learn! Thank you!

UPDATE: @Sagar Patel Here is what my yml file looks like. Definitely has to be some issue in here that is causing the problem. (I switched my network host to .0.0.0.0 as suggested in the thread provided by @fuzzy_logic).

enter image description here enter image description here

Upvotes: 5

Views: 8581

Answers (2)

Fazal Haroon
Fazal Haroon

Reputation: 1163

I'm using the windows platform.

try to use [https://localhost:9200/][1] instead of http://localhost:9200

For more details kindly check this https://stackoverflow.com/a/73842343/9947525

But

the best solution is to use Docker Image of ELK stack which is easy instead of downloading the E L K and then run on the local machine. [1]: https://localhost:9200/

Upvotes: 4

Paulo
Paulo

Reputation: 10346

Tldr;

In you last screen shot we can the the following error ... received plaintext http traffic on an https channel, closing connection ...

Your Elasticsearch seems to be expecting Https and not http

To fix

es = Elasticsearch("https://localhost:9200"
    verify_certs=False) # <- Optional, only if you face issue with verifying the certificate

Upvotes: 6

Related Questions