0
votes

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.

2
It makes no sense. You want to access the instance on AWS and you are 'curl'-ing on localhost to say that it's workingeliasah
i can curl to the localhost from the server itself using ssh but not through the browser using its public DNS curl -XGET localhost:9200 works curl -XGET SERVER_DNS:9200 works but accessing it through browser doesnt workAkshat Goel

2 Answers

1
votes

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.

0
votes

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.