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

**URL:** <https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200/115455>\
**Category:** Kibana\
**Created:** [January 14, 2018, 8:48pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200/115455 "2018-01-14T20:48:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![syiannop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syiannop/32/26920_2.png) [@syiannop](https://discuss.elastic.co/u/syiannop)\
**Post date:** [January 14, 2018, 8:48pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200/115455/1 "2018-01-14T20:48:45Z")

</div>

Hey everybody,

I am new here and with Elasticsearch and Kibana! 🙂

I installed both Elasticsearch and kibana on my Linux Mint 19 and tried the steps described [in this tutorial.](https://www.elastic.co/start)

I did all the steps and got both ES and kibana up and running. But kibana shows that message:

> Unable to connect to Elasticsearch at [http://localhost:9200](http://localhost:9200).

This is a screenshot from kibana:

 ![Screenshot-2018-1-14 Kibana](https://us1.discourse-cdn.com/elastic/original/3X/a/c/ac25fd26b6e1d7bf1b7027c6763cde2b601a3791.png)

The ES is listening on 9200:  
curl -XGET 127.0.0.1:9200  
{  
"name" : "OR8VuCk",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "CnMGr0cQRg2Eb62LDkrbow",  
"version" : {  
"number" : "6.1.1",  
"build\_hash" : "bd92e7f",  
"build\_date" : "2017-12-17T20:23:25.338Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.1.0",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"  
}

Here are some parts of my .yml files:  
kibana.yml  
# 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: "localhost"

# 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: "your-hostname"

# The URL of the Elasticsearch instance to use for all your queries.
#elasticsearch.url: "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

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
#kibana.index: ".kibana"

# The default application to load.
#kibana.defaultAppId: "home"

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
elasticsearch.username: "kibana"
elasticsearch.password: "pswd"

xpack.security.enabled: false

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

```

elasticsearch.yml  
# ======================== Elasticsearch Configuration =========================  
#  
# NOTE: Elasticsearch comes with reasonable defaults for most settings.  
# Before you set out to tweak and tune the configuration, make sure you  
# understand what are you trying to accomplish and the consequences.  
#  
# The primary way of configuring a node is via this file. This template lists  
# the most important settings you may want to configure for a production cluster.  
#  
# Please consult the documentation for further information on configuration options:  
# [Elasticsearch Guide | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)  
#  
# ---------------------------------- Cluster -----------------------------------  
#  
# Use a descriptive name for your cluster:  
#  
#cluster.name: my-application  
#  
# ------------------------------------ Node ------------------------------------  
#  
# Use a descriptive name for the node:  
#  
#node.name: node-1  
#  
# Add custom attributes to the node:  
#  
#node.attr.rack: r1  
#  
# ----------------------------------- Paths ------------------------------------  
#  
# Path to directory where to store the data (separate multiple locations by comma):  
#  
#path.data: /path/to/data  
#  
# Path to log files:  
#  
#path.logs: /path/to/logs  
#  
# ----------------------------------- Memory -----------------------------------  
#  
# Lock the memory on startup:  
#  
#bootstrap.memory\_lock: true  
#  
# Make sure that the heap size is set to about half the memory available  
# on the system and that the owner of the process is allowed to use this  
# limit.  
#  
# Elasticsearch performs poorly when the system is swapping the memory.  
#  
# ---------------------------------- Network -----------------------------------  
#  
# Set the bind address to a specific IP (IPv4 or IPv6):  
#  
#network.host: 127.0.0.1  
#  
# 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:  
#  
# 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  
# ---------------------------------- Security -----------------------------------  
xpack.security.enabled: false

I am sure that is newbie mistake, can anybody give me a hint of what the problem might be? 🙂

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [January 15, 2018, 9:26am UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200/115455/2 "2018-01-15T09:26:54Z")

</div>

This looks actually alright. Could you try changing the `elasticsearch.url` in you `kibana.yml` to `http://127.0.0.1:9200` just to rule out some issues with DNS resolving?

---

<div class="post-metadata">

**Author:** ![syiannop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syiannop/32/26920_2.png) [@syiannop](https://discuss.elastic.co/u/syiannop)\
**Post date:** [January 15, 2018, 2:28pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200/115455/3 "2018-01-15T14:28:40Z")

</div>

Hey Tim, thank you for your response! I had already tried it, but after I saw your post I checked it again and I had actually forgotten to remove the "#". 😩 It works fine now. Thank you very much 😃

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [January 15, 2018, 2:29pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200/115455/4 "2018-01-15T14:29:56Z")

</div>

Glad the problem is solved, though I am still a bit confused, what causes `localhost` on your system not to resolve properly 🤔 But I guess that's a problem for [another forum](https://superuser.com/) 😉

Cheers,  
Tim

---

<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:** [February 12, 2018, 2:30pm UTC](https://discuss.elastic.co/t/kibana-unable-to-connect-to-elasticsearch-at-http-localhost-9200/115455/5 "2018-02-12T14:30:29Z")

</div>

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