S S
S S

Reputation: 1503

Elasticsearch is not running in browser

I have downloaded the Elasticsearch 8.1 in my Ubuntu. After successful installation, when I execute

curl -u elastic https://127.0.0.1:9200 -k

It is showing expected elasticsearch response. But when I hit http://127.0.0.1:9200/ or http://localhost:9200 in my browser, it is returning

Error response

After installation, I added network.host: 127.0.0.1 to elasticsearch.yml

Can anybody help me, why it is not running in browser ?

I am using Ubuntu 20 OS & following this Doc

Upvotes: 6

Views: 4597

Answers (4)

Val
Val

Reputation: 217314

As of version 8.0, Elasticsearch security is turned on by default and SSL/TLS is required for HTTP communications.

There are at least two options:

  1. call https:// - as you did successfully via curl

  2. disable HTTP security, but that's discouraged.

Upvotes: 6

kurt
kurt

Reputation: 653

Like others mentioned, from version 8.0 security is turned on by default. But if you just want to quickly set up elasticsearch locally (and so security is not a concern) you can disable security:

  1. go into config folder
  2. open the elasticsearch.yml file and paste the following lines at the end:
xpack.security.enabled: false
xpack.security.transport.ssl.enabled: false
xpack.security.http.ssl.enabled: false
  1. finally just restart elasticsearch

Now you should be able to open http://127.0.0.1:9200 without login prompts (in the browser) and curl/postman, etc and get proper 200 responses.

Upvotes: 2

noorullahkarimi
noorullahkarimi

Reputation: 111

just put this url :

https://localhost:9200/

It run on the https, I hope it is helpfull.

Upvotes: 1

Fazal Haroon
Fazal Haroon

Reputation: 1163

I am using the windows platform, the steps are the same. When you run the elasticsearch.bat in cmd

enter image description here

use this port for elasticsearch HTTPS secure https://localhost:9200/

check the username and password scroll down the cmd running elasticsearch enter image description here

After login into the elasticsearch. Hurry...

enter image description here

Thanks

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.

Upvotes: 1

Related Questions