# Unable to connect to Elasticsearch at http://server\_ip:9200

**URL:** <https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366>\
**Category:** Elasticsearch\
**Created:** [June 26, 2018, 5:59am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366 "2018-06-26T05:59:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![davis](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@davis](https://discuss.elastic.co/u/davis)\
**Post date:** [June 26, 2018, 5:59am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/1 "2018-06-26T05:59:12Z")

</div>

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?!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2018, 6:37am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/2 "2018-06-26T06:37:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2018, 6:37am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/3 "2018-06-26T06:37:51Z")

</div>

May be you have a proxy defined in your browser.

---

<div class="post-metadata">

**Author:** ![davis](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@davis](https://discuss.elastic.co/u/davis)\
**Post date:** [June 26, 2018, 6:48am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/4 "2018-06-26T06:48:32Z")

</div>

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?!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2018, 7:02am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/5 "2018-06-26T07:02:04Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) 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:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

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

Anyway. Where did you run that command from?

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

```

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

---

<div class="post-metadata">

**Author:** ![davis](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@davis](https://discuss.elastic.co/u/davis)\
**Post date:** [June 26, 2018, 7:25am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/6 "2018-06-26T07:25:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2018, 7:52am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/7 "2018-06-26T07:52:16Z")

</div>

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...

---

<div class="post-metadata">

**Author:** ![davis](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@davis](https://discuss.elastic.co/u/davis)\
**Post date:** [June 26, 2018, 8:11am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/8 "2018-06-26T08:11:52Z")

</div>

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/](http://ip_address:9200/) in command line and also I can access to kibana via that ip\_address...!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2018, 8:28am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/9 "2018-06-26T08:28:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![davis](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@davis](https://discuss.elastic.co/u/davis)\
**Post date:** [June 26, 2018, 8:34am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/10 "2018-06-26T08:34:56Z")

</div>

In the SAME browser, I can connect to kibana [http://ip\_address:5601/app/kibana#/management/kibana/index?\_g=()](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! 😖

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2018, 8:56am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/11 "2018-06-26T08:56:05Z")

</div>

I don't know.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 24, 2018, 8:56am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-at-http-server-ip-9200/137366/12 "2018-07-24T08:56:08Z")

</div>

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