Akshat Goel
Akshat Goel

Reputation: 786

Elasticsearch inaccesible from browser

I have installed elasticsearch and marvel and am able to access elasticsearch through curl.

This is what I get when i curl to PUBLIC_DNS:9200

{
"status" : 200,
"name" : "Ares",
"version" : {
"number" : "1.1.1",
"build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc",
"build_timestamp" : "2014-04-16T14:27:12Z",
"build_snapshot" : false,
"lucene_version" : "4.7"
},
"tagline" : "You Know, for Search"
}

and this when I curl to PUBLIC_DNS:9200/_plugin/marvel/

<head><meta http-equiv="refresh" content="0; URL=/_plugin/marvel/"></head>

How is it possible for me to access Elasticsearch through browser. The installation guide says it should be available through browser on localhost:9200

The server is running on an AWS instance will port 9200 added to the securitygroup.

Upvotes: 0

Views: 9968

Answers (2)

Hemant Kumar
Hemant Kumar

Reputation: 315

To access the Elasticsearch server from the other browser you need to enable the firewall of the server by running the below commands

To check the current status run - sudo ufw status verbose

To enable the firewall for accessing the elasticsearch from anywhere, run - ufw enable.

Upvotes: 0

Prabin Meitei
Prabin Meitei

Reputation: 2000

In you comment you have mentioned that curl -XGET SERVER_DGNS:9200 works. From where you were trying that? From the server itself(in AWS) or from your local system. Where is the browser you were trying to access the URL from?

What is the value you have set on "network.bind_host" and "network.host" in your elasticsearch.yml config? Using default configuration elasticsearch is accessible from anywhere. But for security reasons many people bind it to localhost or the intranet ip to restrict access to outside.

Upvotes: 1

Related Questions