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

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.

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

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
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
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
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
container_name: kibana
environment:
- ELASTICSEARCH_HOSTS=http://es01:9200 http://es02: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 => 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

@Rainer_Bieniek try changing

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

to

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

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

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.

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