# Why Kibana cannot fetch indices from ES in docker?

**URL:** <https://discuss.elastic.co/t/why-kibana-cannot-fetch-indices-from-es-in-docker/132567>\
**Category:** Kibana\
**Created:** [May 19, 2018, 10:32am UTC](https://discuss.elastic.co/t/why-kibana-cannot-fetch-indices-from-es-in-docker/132567 "2018-05-19T10:32:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alireza\_hoseini](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@alireza\_hoseini](https://discuss.elastic.co/u/alireza_hoseini)\
**Post date:** [May 19, 2018, 10:32am UTC](https://discuss.elastic.co/t/why-kibana-cannot-fetch-indices-from-es-in-docker/132567/1 "2018-05-19T10:32:30Z")

</div>

I have run isolated containers for ES and Kibana and exposed their ports in to the host machine. When I run Kibana it can connect to ES:9200:

`{"type":"log","@timestamp":"2018-05-19T10:05:24Z","tags":["status","plugin:elasticsearch@6.2.4","info"],"pid":1,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://172.16.132.12:9200."}`

It reports that I could not connect to 9200 port but when I started ES container. It turned from red to green state.

When I check count of documents for a specific index it reports that it's increasing, so data is being imported into ES:

```
curl http://localhost:9200/_cat/indices/lgg-20180519?v

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open lgg-20180519 UIya79T-TMadxZMJdNcIeQ 5 1 **246** 0 412.1kb 412.1kb

```

Count of documents is 246 and goes up.

Now when I go to `Kibana` dashboard and use `devTools` to list indices by command `GET _cat/indices`, it reports that it just only has:

`yellow open .kibana dyQy2N7TRa-1TMtjgXu8KQ 1 1 1 0 3.6kb 3.6kb`

But I'm almost sure that indices are much more than that, As I have issued a command to list indices. What is happening and why data is not listed in Kabana?

Sample document in ES for `lgg-20180519`is like below:

```
 {
        "_index" : "lgg-20180519",
        "_type" : "lgg",
        "_id" : "uPrpd2MBGspCRkmTPSrj",
        "_score" : 1.0,
        "_source" : {
          "container_id" : "fe5e95b40050f793f224bf87ee8fa5c8b34c04aae4a823021e3e02fe1b6c1d8e",
          "container_name" : "/dev_lgg.1.mk5dcm444o3zfc8sjuefafgu5",
          "source" : "stderr",
          "log" : "2018-05.......TRUNCATED",
          "@timestamp" : "2018-05-19T10:19:00.000000000+00:00"
}

```

It has timestamp. It has data. I'm really frustrated with this problem. Any help would be appreciated.

The interesting thing about this is that when I use `cURL` to do the exact same thing as Kibana in host machine:

`curl "http://localhost:5601/elasticsearch/lgg-20180519/_mapping/field/*?_=1526727164121&ignore_unavailable=false&allow_no_indices=false&include_defaults=true"`

It cannot found the index either! Why is this happening. Does kibana need any other configuration other than `ES host and port`?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 21, 2018, 12:43pm UTC](https://discuss.elastic.co/t/why-kibana-cannot-fetch-indices-from-es-in-docker/132567/2 "2018-05-21T12:43:48Z")

</div>

@alireza_hoseini this is almost certainly an issue with your networking configuration in Docker, and the inability for the Kibana container to communicate with Elasticsearch via that ip address and port. I'd recommend starting with ensure that you're able to execute the following curl command from the Kibana container and connect to the Elasticsearch instance `curl http://{insert the elasticsearch ip here}:9200`.

---

<div class="post-metadata">

**Author:** ![alireza\_hoseini](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@alireza\_hoseini](https://discuss.elastic.co/u/alireza_hoseini)\
**Post date:** [May 23, 2018, 4:53am UTC](https://discuss.elastic.co/t/why-kibana-cannot-fetch-indices-from-es-in-docker/132567/3 "2018-05-23T04:53:05Z")

</div>

Thank you. Problem solved.

---

<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:** [June 20, 2018, 4:53am UTC](https://discuss.elastic.co/t/why-kibana-cannot-fetch-indices-from-es-in-docker/132567/4 "2018-06-20T04:53:20Z")

</div>

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