Unable to connect to Elasticsearch at http://server_ip:9200

hi all... I installed Es in my ubuntu machine, successfully... And, I can curl in in command.The result is below:
curl -XGET "http://ip_address:9200"
{
"name" : ".....",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "......",
"version" : {
"number" : "5.6.9",
"build_hash" : ".....",
"build_date" : "2018-04-12T16:25:14.838Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}

The problem is that I can not connect to http://server_ip:9200 in web browser. It says, 'this site can't be reached'.
I checked the ports, port 9200/9300 is lestening:
java 5006 elasticsearch 130u IPv6 197957 0t0 TCP ip_addr:9300 (LISTEN)
java 5006 elasticsearch 150u IPv6 197977 0t0 TCP ip_addr:9200 (LISTEN)

What is the problem? Do you have any idea?!

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with </> icon. Check the preview window.

May be you have a proxy defined in your browser.

sorry @dadoonet ... I edited the question post.
I checked the proxy, i didn't have set any proxy! I am working on a remote server, should I check some another things which I might ignoring?!

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Anyway. Where did you run that command from?

curl -XGET "http://ip_address:9200"

From the same machine your browser is running?
From the machine elasticsearch is running?

I run that command from the machine with ip='ip_address' which is a VPS ... And I want to connect to that http://ip_address:9200 from a local system...
I installed kibana, and set that ip_address to kibana.yml as server.host. And it worked, I can access to kibana with curl in commandline and also access via browser!
But I don't understand what is the matter with elasticsearch and it's port!

I don't know as I don't have the full picture but in elasticsearch logs, you will see a line saying what is the IP and PORT (9200) elasticsearch is bound to.

This is the only address you can use to connect to elasticsearch. Any other address won't work directly. Or you need something like a nginx may be to route from one IP to the Elasticsearch one...

i checked the elasticsearch.log file . The ip_address is the same with the ip which I enter in browser!

[2018-06-26T03:16:40,382][INFO ][o.e.h.n.Netty4HttpServerTransport] [jxcsRHU] 
publish_address {ip_address:9200}, bound_addresses {ip_address:9200}

Again, the ip_address which is here is the same with the ip which I enter in browser!
I am surprised, how it is possible that I can not access to ES in browser, while I can curl to http://ip_address:9200/ in command line and also I can access to kibana via that ip_address...!

If from the same machine curl works but not your browser, it means that your browser has a specific configuration. Most of times (if not 100%) in this forum, it's a proxy issue.

In the SAME browser, I can connect to kibana http://ip_address:5601/app/kibana#/management/kibana/index?_g=()
As you know, I set the same ip_address in server.host fiels in kibana.yml to be in connected to elasticsearch
As I said, I didn't have set proxy in browser...
I am confused! :confounded:

I don't know.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.