# Docker Compose for Elastic+Kibana? Errors when starting

**URL:** <https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314>\
**Category:** Elasticsearch\
**Created:** [February 3, 2018, 5:26pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314 "2018-02-03T17:26:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![roybatty](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@roybatty](https://discuss.elastic.co/u/roybatty)\
**Post date:** [February 3, 2018, 5:26pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314/1 "2018-02-03T17:26:59Z")

</div>

HI All,

I tried to bring up elastic and kibana using docker, but it seems to have gone wrong. Does anyone have any suggestions for me?

I took this docker compose file as my starting point:  
[https://github.com/elastic/stack-docker/blob/master/docker-compose.yml](https://github.com/elastic/stack-docker/blob/master/docker-compose.yml)

I removed most things, except for the desired elastic + kibana entries, and I added "discovery.type=single-node" like this:

```
elasticsearch:
    container_name: elasticsearch
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:${TAG}
    #command: -e "discovery.type=single-node"
    environment:
    - discovery.type=single-node
    ...

```

I started everything up via:

```
ELASTIC_VERSION=6.1.3 TAG=6.1.3 ELASTIC_PASSWORD=changeme docker-compose up

```

However there are quite a few errors on stdout/stderr e.g.

```
    "License information from the X-Pack plugin could not be obtained from
    Elasticsearch for the [data] cluster. [invalid_index_name_exception]
    Invalid index name [_xpack], must not start with '_'.

```

I am able to access the Kibana URL ([http://localhost:5601/](http://localhost:5601/)) but on the initial login screen is a warning:

```
Login is currently disabled. Administrators should consult the Kibana logs for more details.

```

Any ideas about the source of the problem?  
I assume I'm meant to supply the password via the environment (and that "changeme" is correct)?  
I chose the "basic" OSS ES image version, perhaps should I have pulled the Xpack image instead?

These are the docker images I used:

```
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.elastic.co/kibana/kibana 6.1.3 a3f439b54fc4 7 days ago 963MB
docker.elastic.co/elasticsearch/elasticsearch-oss 6.1.3 eea176d246d7 7 days ago 475MB
archlinux/base latest 71415bf73a2b 5 weeks ago 394MB

```

Oh, I just noticed that much further down in the original github docker-compose file there is another Kibana related entry called "setup\_kibana" ... maybe I also need to include/run that in my compose file?

Thanks in advance!

---

<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:** [February 3, 2018, 6:14pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314/2 "2018-02-03T18:14:43Z")

</div>

Here is a docker-compose file I'm using:

```auto
---
version: '3'
services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-platinum:$ELASTIC_VERSION
    environment:
      - bootstrap.memory_lock=true
      - ELASTIC_PASSWORD=changeme
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
      - cluster.routing.allocation.disk.threshold_enabled=false
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
    networks: ['stack']

  kibana:
    image: docker.elastic.co/kibana/kibana:$ELASTIC_VERSION
    links:
      - elasticsearch
    ports:
      - 5601:5601
    networks: ['stack']
    depends_on:
      - elasticsearch

networks:
  stack: {}

```

```auto
$ cat .env 
ELASTIC_VERSION=6.1.3

```

I'm also using this one for another purpose:

```auto
---
version: '3'
services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:$ELASTIC_VERSION
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
      - cluster.routing.allocation.disk.threshold_enabled=false
      - xpack.security.enabled=false
      - xpack.ml.enabled=false
      - xpack.watcher.enabled=false
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
    networks: ['stack']

  kibana:
    image: docker.elastic.co/kibana/kibana:$ELASTIC_VERSION
    links:
      - elasticsearch
    ports:
      - 5601:5601
    networks: ['stack']
    depends_on:
      - elasticsearch

networks:
  stack: {}

```

I hope this can help.

---

<div class="post-metadata">

**Author:** ![roybatty](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@roybatty](https://discuss.elastic.co/u/roybatty)\
**Post date:** [February 5, 2018, 9:24pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314/3 "2018-02-05T21:24:13Z")

</div>

Humm. Well those are two different compose file examples. Different from that in github and from each other.

The xpack.\*.enabled=false options looked promising - it seemed like they might be related to one of my problems (e.g the "Invalid index name [\_xpack]" error). However when I added them to my compose file elasticsearch crashes at start time with an IllegalArgumentException i.e.

```
elasticsearch | [2018-02-05T21:13:26,112][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
elasticsearch | org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [xpack.watcher.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

```

You must be using a different version of elasticsearch.

Oh well.

---

<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:** [February 5, 2018, 10:25pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314/4 "2018-02-05T22:25:19Z")

</div>

> [@roybatty](#):
>
> You must be using a different version of elasticsearch.

Sure.  
You are using `docker.elastic.co/elasticsearch/elasticsearch-oss` which does not come with x-pack.

---

<div class="post-metadata">

**Author:** ![roybatty](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@roybatty](https://discuss.elastic.co/u/roybatty)\
**Post date:** [February 6, 2018, 1:41pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314/5 "2018-02-06T13:41:07Z")

</div>

> [@dadoonet](#):
>
> You are using [docker.elastic.co/elasticsearch/elasticsearch-oss](http://docker.elastic.co/elasticsearch/elasticsearch-oss) which does not come with x-pack

That was one of the questions in my original post! I.e.

> [@roybatty](#):
>
> I chose the "basic" OSS ES image version, perhaps should I have pulled the Xpack image instead?

Is the oss version functional? I can certainly try the x-pack version if you think it would help. Although, from what I have read on your site, it seems that it should be the case that kibana + es-oss should work.

Which brings us back to my other questions:

1. Kibana Web UI error: Login is currently disabled. Why? How to further analyse?
2. Stream of errors of the form: License information from the X-Pack plugin could not be obtained ... invalid\_index\_name\_exception. Does this indicate a problem?
3. I assume I'm meant to supply the password via the environment (and that "changeme" is correct)?
4. Much further down in your ([elastic.co](http://elastic.co)) github docker-compose file there is another Kibana related entry called "setup\_kibana". Is this required?

---

<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:** [February 6, 2018, 1:56pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314/6 "2018-02-06T13:56:16Z")

</div>

If you are pulling `elasticsearch-oss` and `kibana-oss` images, you should not see anything related to security.

> Is the oss version functional?

Yes.

> I can certainly try the x-pack version if you think it would help.

Not mandatory. It helps if you need security, alerting, monitoring, machine learning, graph, migration assistant...

My guess here is that you did pulled the kibana-oss image. See [Install Kibana with Docker | Kibana Guide [8.11] | Elastic](https://www.elastic.co/guide/en/kibana/current/_image_types.html)

---

<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:** [March 6, 2018, 1:56pm UTC](https://discuss.elastic.co/t/docker-compose-for-elastic-kibana-errors-when-starting/118314/7 "2018-03-06T13:56:19Z")

</div>

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