# Kibana 7.5.2 under container FATAL Error: Optimizations failure. 5818 modules

**URL:** <https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694>\
**Category:** Kibana\
**Created:** [February 3, 2020, 9:06pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694 "2020-02-03T21:06:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![elemus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elemus/32/61976_2.png) [@elemus](https://discuss.elastic.co/u/elemus)\
**Post date:** [February 3, 2020, 9:06pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694/1 "2020-02-03T21:06:56Z")

</div>

Hi, I'm working on Kibana 7.5.2 docker container trying to connect to elasticsearch cluster using docker-compose but can't initialize, I tried several solutions of another versions, like disable _xpack.reporting_ or _xpack.graph_ but with no luck, someone had a similar problem? and can share the solution with us?

I already searched in this forum but not found something helpful.

Thanks in advance for your help.

---

<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:** [February 3, 2020, 10:53pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694/2 "2020-02-03T22:53:15Z")

</div>

Hey @elemus, can you please post the exact error that you're seeing and your docker-compose.yml ?

---

<div class="post-metadata">

**Author:** ![Rainer\_Bieniek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rainer_bieniek/32/62044_2.png) [@Rainer\_Bieniek](https://discuss.elastic.co/u/Rainer_Bieniek)\
**Post date:** [February 4, 2020, 4:26pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694/3 "2020-02-04T16:26:15Z")

</div>

Got the same problems while setting up a showcase on running a couple of devops tools in a docker-compose file

My docker-compose.yml is this so far  
version: '3.7'  
services:  
es01:  
image: [docker.elastic.co/elasticsearch/elasticsearch:7.5.2](http://docker.elastic.co/elasticsearch/elasticsearch:7.5.2)  
container\_name: es01  
environment:  
- node.name=es01  
- cluster.name=es-docker-cluster  
- discovery.seed\_hosts=es02,es03  
- cluster.initial\_master\_nodes=es01,es02,es03  
- bootstrap.memory\_lock=true  
- "ES\_JAVA\_OPTS=-Xms512m -Xmx512m"  
ulimits:  
memlock:  
soft: -1  
hard: -1  
volumes:  
- data01:/usr/share/elasticsearch/data  
ports:  
- 127.0.0.1:9200:9200  
networks:  
- elastic  
es02:  
image: [docker.elastic.co/elasticsearch/elasticsearch:7.5.2](http://docker.elastic.co/elasticsearch/elasticsearch:7.5.2)  
container\_name: es02  
environment:  
- node.name=es02  
- cluster.name=es-docker-cluster  
- discovery.seed\_hosts=es01,es03  
- cluster.initial\_master\_nodes=es01,es02,es03  
- bootstrap.memory\_lock=true  
- "ES\_JAVA\_OPTS=-Xms512m -Xmx512m"  
ulimits:  
memlock:  
soft: -1  
hard: -1  
volumes:  
- data02:/usr/share/elasticsearch/data  
networks:  
- elastic  
es03:  
image: [docker.elastic.co/elasticsearch/elasticsearch:7.5.2](http://docker.elastic.co/elasticsearch/elasticsearch:7.5.2)  
container\_name: es03  
environment:  
- node.name=es03  
- cluster.name=es-docker-cluster  
- discovery.seed\_hosts=es01,es02  
- cluster.initial\_master\_nodes=es01,es02,es03  
- bootstrap.memory\_lock=true  
- "ES\_JAVA\_OPTS=-Xms512m -Xmx512m"  
ulimits:  
memlock:  
soft: -1  
hard: -1  
volumes:  
- data03:/usr/share/elasticsearch/data  
networks:  
- elastic  
kibana:  
image: [docker.elastic.co/kibana/kibana:7.5.2](http://docker.elastic.co/kibana/kibana:7.5.2)  
container\_name: kibana  
environment:  
- ELASTICSEARCH\_HOSTS=http://es01:9200 [http://es02:9200](http://es02:9200) [http://es03:9200](http://es03:9200)  
- ELASTICSEARCH\_LOGQUERIES=true  
- LOGGING\_VERBOSE=true  
depends\_on:  
- es01  
- es02  
- es03  
ports:  
- 127.0.0.1:5601:5601  
networks:  
- elastic

volumes:  
data01:  
driver: local-persist  
driver\_opts:  
mountpoint: /tmp/data/ops-env-sample/es01-data  
data02:  
driver: local-persist  
driver\_opts:  
mountpoint: /tmp/data/ops-env-sample/es02-data  
data03:  
driver: local-persist  
driver\_opts:  
mountpoint: /tmp/data/ops-env-sample/es03-data  
kibana:  
driver: local-persist  
driver\_opts:  
mountpoint: /tmp/data/ops-env-sample/kibana

networks:  
elastic:  
driver: bridge

On starting the compose file, I yield a huge eror log:  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","legacy-plugins"],"pid":6,"path":"/usr/share/kibana/x-pack","message":"Found plugin at /usr/share/kibana/x-pack"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","data","query"],"pid":6,"message":"0\nGET /\_xpack\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["error","elasticsearch","data"],"pid":6,"message":"Request error, retrying\nGET [http://es01:9200/\_xpack](http://es01:9200/_xpack) =\> connect ECONNREFUSED 172.19.0.2:9200"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins","licensing"],"pid":6,"message":"Calling [data] Elasticsearch \_xpack API. Polling frequency: 30001"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["warning","plugins","licensing"],"pid":6,"message":"License information could not be obtained from Elasticsearch for the [data] cluster. Error: Request Timeout after 30000ms"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","savedobjects-service"],"pid":6,"message":"Setting up SavedObjects service"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","config"],"pid":6,"message":"Marking config path as handled: kibana"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","config"],"pid":6,"message":"Marking config path as handled: migrations"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","root"],"pid":6,"message":"starting root"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","server"],"pid":6,"message":"starting server"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-service"],"pid":6,"message":"Plugins service starts plugins"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["info","plugins-system"],"pid":6,"message":"Starting [8] plugins: [security,licensing,code,timelion,features,spaces,data,translations]"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "security"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins","security"],"pid":6,"message":"Starting plugin"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "licensing"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "code"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "timelion"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins","timelion"],"pid":6,"message":"Starting plugin"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "features"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins","features"],"pid":6,"message":"Starting plugin"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "spaces"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "data"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","plugins-system"],"pid":6,"message":"Starting plugin "translations"..."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","savedobjects-service"],"pid":6,"message":"Starting SavedObjects service"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","config"],"pid":6,"message":"Marking config path as handled: migrations"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","data","query"],"pid":6,"message":"200\nHEAD /\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","data","query"],"pid":6,"message":"200\nHEAD /\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nGET /.kibana\_task\_manager\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nGET /.kibana\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nGET /.kibana\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nGET /.kibana\_task\_manager\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","data","query"],"pid":6,"message":"200\nGET /\_xpack\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["info","plugins","licensing"],"pid":6,"message":"Imported changed license information from Elasticsearch for the [data] cluster: type: basic | status: active"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nPOST /.kibana\_task\_manager/\_count\n{"query":{"bool":{"should":[{"bool":{"must":[{"exists":{"field":"graph-workspace"}},{"bool":{"must\_not":{"term":{"migrationVersion.graph-workspace":"7.0.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"space"}},{"bool":{"must\_not":{"term":{"migrationVersion.space":"6.6.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"map"}},{"bool":{"must\_not":{"term":{"migrationVersion.map":"7.5.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"canvas-workpad"}},{"bool":{"must\_not":{"term":{"migrationVersion.canvas-workpad":"7.0.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"task"}},{"bool":{"must\_not":{"term":{"migrationVersion.task":"7.4.0"}}}}]}}]}}}"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nGET /.kibana\_task\_manager\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nPOST /.kibana/\_count\n{"query":{"bool":{"should":[{"bool":{"must":[{"exists":{"field":"graph-workspace"}},{"bool":{"must\_not":{"term":{"migrationVersion.graph-workspace":"7.0.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"space"}},{"bool":{"must\_not":{"term":{"migrationVersion.space":"6.6.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"map"}},{"bool":{"must\_not":{"term":{"migrationVersion.map":"7.5.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"canvas-workpad"}},{"bool":{"must\_not":{"term":{"migrationVersion.canvas-workpad":"7.0.0"}}}}]}},{"bool":{"must":[{"exists":{"field":"task"}},{"bool":{"must\_not":{"term":{"migrationVersion.task":"7.4.0"}}}}]}}]}}}"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","elasticsearch","admin","query"],"pid":6,"message":"200\nGET /.kibana\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:03Z","tags":["debug","legacy-service"],"pid":6,"message":"starting legacy service"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:05Z","tags":["warning","saved-objects"],"pid":6,"message":"Saved Objects uninitialized because the Kibana plugin is disabled."}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:05Z","tags":["info","optimize"],"pid":6,"message":"Optimizing and caching bundles for core, graph, monitoring, space\_selector, login, overwritten\_session, logout, logged\_out, ml, dashboardViewer, apm, maps, canvas, infra, siem, uptime and lens. This may take a few minutes"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:33Z","tags":["debug","plugins","licensing"],"pid":6,"message":"Calling [data] Elasticsearch \_xpack API. Polling frequency: 30001"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:12:33Z","tags":["debug","elasticsearch","data","query"],"pid":6,"message":"200\nGET /\_xpack\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:13:03Z","tags":["debug","plugins","licensing"],"pid":6,"message":"Calling [data] Elasticsearch \_xpack API. Polling frequency: 30001"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:13:03Z","tags":["debug","elasticsearch","data","query"],"pid":6,"message":"200\nGET /\_xpack\n"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:13:04Z","tags":["debug","root"],"pid":6,"message":"shutting root down"}  
kibana | {"type":"log","@timestamp":"2020-02-04T16:13:04Z","tags":["fatal","root"],"pid":6,"message":"{ Error: Optimizations failure.\n 5818 modules\n \n ERROR in ./src/legacy/ui/public/filter\_manager/query\_filter.js\n Module not found: Error: Can't resolve 'plugins/data' in '/usr/share/kibana/src/legacy/ui/public/filter\_manager'\n \n ERROR in ./src/legacy/ui/public/vis/editors/default/controls/filter.js\n Module not found: Error: Can't resolve 'plugins/data' in '/usr/share/kibana/src/legacy/ui/public/vis/editors/default/controls'\n \n

I omitted the full log because it doesn't fit into this web app anyway

---

<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:** [February 4, 2020, 11:25pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694/4 "2020-02-04T23:25:34Z")

</div>

@Rainer_Bieniek try changing

```auto
- ELASTICSEARCH_HOSTS=http://es01:9200 http://es02:9200 http://es03:9200

```

to

```auto
- ELASTICSEARCH_HOSTS=["http://es01:9200","http://es02:9200","http://es03:9200"]

```

---

<div class="post-metadata">

**Author:** ![Rainer\_Bieniek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rainer_bieniek/32/62044_2.png) [@Rainer\_Bieniek](https://discuss.elastic.co/u/Rainer_Bieniek)\
**Post date:** [February 5, 2020, 12:01pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694/5 "2020-02-05T12:01:31Z")

</div>

Already tried yesterday. Kibana refused to start with this setting.

I also tried to pre-optimize the Kibana container with an embedded build step using a Dockerfile which in turn called 'kibana-docker --optimize'

The build worked, however, uppn starting with the environment variables, the kibana container attempted that optimization step again

I try downgrading to 7.4.x later today.

Not a good situation,

Rb

---

<div class="post-metadata">

**Author:** ![elemus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elemus/32/61976_2.png) [@elemus](https://discuss.elastic.co/u/elemus)\
**Post date:** [February 6, 2020, 11:06pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694/6 "2020-02-06T23:06:30Z")

</div>

> [@Rainer\_Bieniek](#):
>
> /tmp/data/ops-env-sample/kibana

I think you can verify permissions in host machine to:  
'/tmp/data/ops-env-sample/kibana'

Is weird but my problems was solved after:

1. reboot machine (weird because is a osx environment)
2. check permissions again and use volumes pointing to folders with permissions.

---

<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 5, 2020, 11:06pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-under-container-fatal-error-optimizations-failure-5818-modules/217694/7 "2020-03-05T23:06:34Z")

</div>

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