# Unable to start Kibana in Docker Swarm

**URL:** <https://discuss.elastic.co/t/unable-to-start-kibana-in-docker-swarm/230103>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [April 28, 2020, 8:19am UTC](https://discuss.elastic.co/t/unable-to-start-kibana-in-docker-swarm/230103 "2020-04-28T08:19:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshat\_Tandon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akshat_tandon/32/67275_2.png) [@Akshat\_Tandon](https://discuss.elastic.co/u/Akshat_Tandon)\
**Post date:** [April 28, 2020, 8:19am UTC](https://discuss.elastic.co/t/unable-to-start-kibana-in-docker-swarm/230103/1 "2020-04-28T08:19:30Z")

</div>

Hi I am trying to create kibana service in my local swarm environment, But unfortunately it consistently fails after giving `Error: Optimizations failure` Error.

My Kibana.yml file is as follows

```auto
version: '3'

services:
  kibana:
    image: docker.elastic.co/kibana/kibana:7.6.0
    deploy:
      mode: replicated
      replicas: 1
      resources:
        limits:
          memory: 4G
      restart_policy:
        condition: on-failure
        delay: 10s
        max_attempts: 3
    ports:
      - "5601:5601"
    environment:
      SERVER_NAME: "Development Kibana"
      XPACK_MONITORING_ENABLED: "true"
      XPACK_SECURITY_ENABLED: "true"
      ELASTICSEARCH_USERNAME: ""
      ELASTICSEARCH_PASSWORD: ""
      SERVER_PORT: "5601"
      ELASTICSEARCH_HOSTS: "http://elasticserver"
    volumes:
      - kibana:/usr/share/kibana/data
    networks:
      - balance
      
networks:
  balance:
    driver: overlay
    
volumes:
  kibana:

```

and it failed after giving following error

```auto
        {"type":"log","@timestamp":"2020-04-28T05:37:19Z","tags":["fatal","root"],"pid":6,"message":"{ Error: Optimizations failure.\n 6583 modules\n \n ERROR in ./x-pack/legacy/plugins/canvas/public/components/app/index.js\n Module not found: Error: Can't resolve 'plugins/interpreter/canvas/load_legacy_server_function_wrappers' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/components/app'\n \n ERROR in ./x-pack/legacy/plugins/canvas/public/lib/run_interpreter.js\n Module not found: Error: ...
    FATAL Error: Optimizations failure.,
       6583 modules,
        ,
        ERROR in ./x-pack/legacy/plugins/canvas/public/components/app/index.js,
        Module not found: Error: Can't resolve 'plugins/interpreter/canvas/load_legacy_server_function_wrappers' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/components/app',
        ,
        ERROR in ./x-pack/legacy/plugins/canvas/public/lib/run_interpreter.js,
        Module not found: Error: Can't resolve 'plugins/interpreter/canvas/load_legacy_server_function_wrappers' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/lib',

```

I tried multiple settings like but it always failed

```auto
    XPACK_SECURITY_ENABLED: "false"
    XPACK_GROKDEBUGGER_ENABLED: "false"
    XPACK_ML_ENABLED: "false"
    XPACK_INFRA_ENABLED: "false"
    XPACK_GROKDEBUGGER_ENABLED: "false"
    XPACK_SEARCHPROFILER_ENABLED: "false"
    XPACK_LICENSE_MANAGEMENT_ENABLED: "false"

```

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 4, 2020, 4:05pm UTC](https://discuss.elastic.co/t/unable-to-start-kibana-in-docker-swarm/230103/2 "2020-05-04T16:05:55Z")

</div>

The optimization failure usually shows up if you are resource limited. Can you remove the optimize folder, add allocate more CPU to the docker container and run again?

---

<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 1, 2020, 4:05pm UTC](https://discuss.elastic.co/t/unable-to-start-kibana-in-docker-swarm/230103/3 "2020-06-01T16:05:56Z")

</div>

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