# Kibana: Unable to connect to Elasticsearch at http://localhost:9200, elasticsearch

**URL:** https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357
**Category:** Kibana
**Created:** [October 26, 2017, 7:33am UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357 "2017-10-26T07:33:10Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![scarletin\_s](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@scarletin\_s](https://discuss.elastic.co/u/scarletin_s)
#### Post date: [October 26, 2017, 7:33am UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/1 "2017-10-26T07:33:10Z")

</div>

hi ,  
im kinda new with elasticsearch, i used to work with Version 5.5 but as i upgraded elastic and kibana to 5.6.3 encountered this issue, my elasticsearch is up and working but kibana reports this error

 ![Screenshot from 2017-10-26 10-02-51](https://us1.discourse-cdn.com/elastic/original/3X/b/b/bbbd55680bacb72cbeb1c6932a86d7c571ebe13b.png)  
i don't change config files at all! so its some how surprising ,i try to reinstall both but nothing worked, i checked another topics with the related error, but as far as i checked none of them helped me out!  
every thing seems fine in elasticsearch log file  
 ![Screenshot from 2017-10-26 11-02-10](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7c215a24a2a5a89d73d46695f619f15d70602765.png)

but in sys log i got this report whereas with netstat i can see elasticsearch is up and running in port 9200, even i checked it with curl and nothing was weird :

 ![Screenshot from 2017-10-26 10-02-32](https://us1.discourse-cdn.com/elastic/original/3X/d/e/de12988c9f18277f517a119693b2d029e82bb8bf.png)

i guess the problem is with kibana , because while server is up and running there is nothing in neststat port 5601

---

<div class="post-metadata">

### Author: ![Conall\_Prendergast](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Conall\_Prendergast](https://discuss.elastic.co/u/Conall_Prendergast)
#### Post date: [October 26, 2017, 10:20am UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/2 "2017-10-26T10:20:14Z")

</div>

Try telling kibana to connect to Elasticsearch at 5.9.40.181 or otherwise tell elasticsearch to listen on 127.0.0.1

---

<div class="post-metadata">

### Author: ![scarletin\_s](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@scarletin\_s](https://discuss.elastic.co/u/scarletin_s)
#### Post date: [October 29, 2017, 7:00am UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/3 "2017-10-29T07:00:19Z")

</div>

@Conall_Prendergast tnx for you're reply , but truthfully i did that in kibana and elasticsearch yml files, i realy dont have any idea what the problem comes from, do you have any thing in mind?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 29, 2017, 8:48am UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/4 "2017-10-29T08:48:44Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them 🙂

Are Elasticsearch and Kibana on the same host? If not did you point Kibana to the `5.9.40.181` IP as suggested? If so please post your configs as well.

---

<div class="post-metadata">

### Author: ![Conall\_Prendergast](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Conall\_Prendergast](https://discuss.elastic.co/u/Conall_Prendergast)
#### Post date: [October 29, 2017, 12:14pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/5 "2017-10-29T12:14:32Z")

</div>

Can you post your kibana.yml and elasticsearch.yml here please

---

<div class="post-metadata">

### Author: ![scarletin\_s](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@scarletin\_s](https://discuss.elastic.co/u/scarletin_s)
#### Post date: [October 29, 2017, 2:45pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/6 "2017-10-29T14:45:43Z")

</div>

this is my elasticsearch config:

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

network.host: 0.0.0.0

# 

# Set a custom port for HTTP:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when new node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

#discovery.zen.ping.unicast.hosts: ["host1", "host2"]

# 

# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

# 

#discovery.zen.minimum\_master\_nodes: 3

# 

# For more information, consult the zen discovery module documentation.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
#xpack.security.enabled: false  
#script.inline: true  
#script.stored: true

http.cors.enabled: true  
http.cors.allow-origin: "\*"

* * *

and as for kibana 🙂  
Kibana is served by a back end server. This setting specifies the port to use.  
#server.port: 5601

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.

# The default is 'localhost', which usually means remote machines will not be able to connect.

# To allow connections from remote users, set this parameter to a non-loopback address.

server.host: "5.9.40.181"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects

# the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests

# to Kibana. This setting cannot end in a slash.

#server.basePath: ""

# The maximum payload size in bytes for incoming server requests.

#server.maxPayloadBytes: 1048576

# The Kibana server's name. This is used for display purposes.

#[server.name](http://server.name): "your-hostname"

# The URL of the Elasticsearch instance to use for all your queries.

#elasticsearch.url: "[http://localhost:9200](http://localhost:9200)"

# When this setting's value is true Kibana uses the hostname specified in the server.host

# setting. When the value of this setting is false, Kibana uses the hostname of the host

# that connects to this Kibana instance.

#elasticsearch.preserveHost: true

verify\_ssl: false

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 29, 2017, 7:53pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/7 "2017-10-29T19:53:12Z")

</div>

Please edit your post and use the `</>` button to format the config code.

---

<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: [November 26, 2017, 7:53pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200-elasticsearch/105357/8 "2017-11-26T19:53:35Z")

</div>

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