# Version conflict, document already exists: index=".kibana"

**URL:** https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081
**Category:** Kibana
**Created:** [November 1, 2017, 6:45pm UTC](https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081 "2017-11-01T18:45:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jwr\_cr](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jwr\_cr](https://discuss.elastic.co/u/jwr_cr)
#### Post date: [November 1, 2017, 6:45pm UTC](https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081/1 "2017-11-01T18:45:31Z")

</div>

I have a freshly installed elasticsearch cluster that hasn't yet ingested any data. I then set up a freshly installed kibana server and pointed my `elasticsearch.url` to the load balancer in front of elasticsearch. Upon logging in to the UI of kibana I'm seeing:

![11 PM](https://us1.discourse-cdn.com/elastic/original/3X/7/5/759450e5ee97644f7a596d71d464df878349ac5f.png)

Anybody know what I did wrong here? Thanks.

Relevant versions:  
kibana-5.2.2-1.x86\_64  
elasticsearch-5.2.2-1.noarch

Here's the full entry from kibana.stdout:

```auto
{
  "type": "log",
  "@timestamp": "2017-11-01T18:33:08Z",
  "tags": [
    "status",
    "plugin:elasticsearch@5.2.2",
    "error"
  ],
  "pid": 3237,
  "state": "red",
  "message": "Status changed from green to red - [version_conflict_engine_exception] [config][5.2.2]: version conflict, document already exists (current version [1]), with { index_uuid=\"_E5U0bWxSHSmLLKOYVjOCg\" & shard=\"2\" & index=\".kibana\" }",
  "prevState": "green",
  "prevMsg": "Kibana index ready"
}
{
  "type": "log",
  "@timestamp": "2017-11-01T18:33:08Z",
  "tags": [
    "status",
    "ui settings",
    "error"
  ],
  "pid": 3237,
  "state": "red",
  "message": "Status changed from green to red - Elasticsearch plugin is red",
  "prevState": "green",
  "prevMsg": "Ready"
}

```

---

<div class="post-metadata">

### Author: ![jwr\_cr](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jwr\_cr](https://discuss.elastic.co/u/jwr_cr)
#### Post date: [November 1, 2017, 8:20pm UTC](https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081/2 "2017-11-01T20:20:59Z")

</div>

Tried 5.6.3 too, same error.

---

<div class="post-metadata">

### Author: ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)
#### Post date: [November 1, 2017, 8:34pm UTC](https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081/3 "2017-11-01T20:34:16Z")

</div>

> [@jwr\_cr](#):
>
> oad balancer in front of elasticsearch.

Hello

Am not too sure what kind of load balancer you are using. I would suggest you to configure kibana to connect directly to elasticsearch to see if that works OK. Then we can debug more if that's successful

Thanks  
Rashmi

---

<div class="post-metadata">

### Author: ![jwr\_cr](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jwr\_cr](https://discuss.elastic.co/u/jwr_cr)
#### Post date: [November 1, 2017, 10:00pm UTC](https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081/4 "2017-11-01T22:00:30Z")

</div>

Thanks for your reply. I tried as you suggested and here is what I found.

Starting by tearing down all of Elasticsearch and Kibana and building new stacks:

Using a 1 node ES cluster, I set Kibana's `elasticsearch.url` to the private IP of that one ES node, bypassing any load balancer. This worked fine.

Tear down and rebuild both stacks.

Using a 3 node ES cluster, I set Kibana's `elasticsearch.url` to the private IP of one of my three ES nodes, chosen at random, bypassing any load balancer. This also worked fine.

Tear down and rebuild both stacks.

Using a 3 node ES cluster, I set Kibana's `elasticsearch.url` to the Amazon ELB which sits in front of the 3 node ES cluster. This resulted in an error creating the '.kibana' index.

```auto
{
  "type": "log",
  "@timestamp": "2017-11-01T21:40:18Z",
  "tags": [
    "status",
    "plugin:elasticsearch@5.6.3",
    "info"
  ],
  "pid": 2760,
  "state": "yellow",
  "message": "Status changed from yellow to yellow - No existing Kibana index found",
  "prevState": "yellow",
  "prevMsg": "Waiting for Elasticsearch"
}
{
  "type": "log",
  "@timestamp": "2017-11-01T21:40:49Z",
  "tags": [
    "status",
    "plugin:elasticsearch@5.6.3",
    "error"
  ],
  "pid": 2760,
  "state": "red",
  "message": "Status changed from yellow to red - Waiting for Kibana index \".kibana\" to come online failed.",
  "prevState": "yellow",
  "prevMsg": "No existing Kibana index found"
}

```

However, the '.kibana' index did actually get created. My Elasticsearch logs from a few seconds following the above entry:

```auto
[2017-11-01T21:43:36,195][INFO][o.e.c.m.MetaDataCreateIndexService] [i-030fd4186fc5c5b96] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_default_, index-pattern, server, visualization, search, timelion-sheet, config, dashboard, url]

```

```auto
curl http://internal-elasticsearch-1317456081.us-east-1.elb.amazonaws.com:9200/_cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open .kibana WMs0MrFfSFqJ6VJUac7ykg 1 1 0 0 162b 162b

```

Since the error seems to happen when I have a load balancer in front of Elasticsearch, do you have any advice for configuring an Amazon ELB to sit in front of ES and serve as my `elasticsearch.url`?

Here's the ELB config I have currently:

![55 PM](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c12b4f34edb84e8514b78cdb3c25a25f6d09a691.jpg)

Since I'm running a 3 node Elasticsearch cluster, my preference is to avoid using any of those individual IPs as my `elasticsearch.url`, as any of those 3 could die and be replaced by autoscaling. So my preference is to use an ELB (or any kind of load balancer) as the `elasticsearch.url`.

Thanks.

---

<div class="post-metadata">

### Author: ![jwr\_cr](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jwr\_cr](https://discuss.elastic.co/u/jwr_cr)
#### Post date: [November 2, 2017, 7:04pm UTC](https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081/5 "2017-11-02T19:04:17Z")

</div>

I ended up tearing out the ELB and doing this instead: [https://www.elastic.co/guide/en/kibana/current/production.html#load-balancing](https://www.elastic.co/guide/en/kibana/current/production.html#load-balancing)

---

<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 30, 2017, 7:04pm UTC](https://discuss.elastic.co/t/version-conflict-document-already-exists-index-kibana/106081/6 "2017-11-30T19:04:43Z")

</div>

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