Problem in installing & configuration of elasticsearch

Actually my requirement is to implement the elasticsearch in my angular application. so i installed the jvm & elasticsearch from the official websites and also i am successfully installed & configured that. but now i am not getting the sample JSON file in the http://localhost:9200/ and it is showing like page not working ,localhost didn't send any data, but if i am using the https://localhost:9200/ i am getting the sample JSON data , why i am not getting the JSON data in the http://localhost:9200/. can anyone please explain the issue why i am not getting the data.


What error are you receiving?

Can you show your elasticsearch.yml file? (hiding any credentials)

Image To Link — Image - DIvloJajAg this is the link for if i am using the https://localhost:9200/ i am getting the above output .

but if i am using http://localhost:9200/ i am getting the error like Image To Link — Image - JEJY9je2dl


This means that you cluster is secured and you must therefore access using https, not http, when you connect from your application.

can you please elaborate your answer..


If your cluster is secured and has TLS enabled, which based on your description seems to be the case, you must use HTTPS to communicate with Elasticsearch. You can not use HTTP, which is unsecured.

To use the "http" you need to go into the your elasticsearch.yml set:
" false"

and restart elasticsearch.

Welcome @NgDinhNamEtiis and thanks for sharing your solution for this.

I'd not recommend disabling security at all, even for dev purposes. I think it's always better to educate our users to have secured clusters.


Agree with your opinion.

today i got the error like
" Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]"
and also both http://localhost:9200/ & https://localhost:9200/ are not working if i am entering the login credentials it is again asking to login continuously. what is the problem behind that, can anyone explain me...