Answers: <p>Elastic was not able to start. The logging indicated:</p>
  
  <pre><code>[2019-12-09T10:22:15,124][INFO ][o.e.b.BootstrapChecks    ] [kViKuCL] bound
  or publishing to a non-loopback address, enforcing bootstrap checks
  ERROR: [1] bootstrap checks failed
  [1]: max virtual memory areas vm.max_map_count [65530] is too low,
  increase to at least [262144]
  </code></pre>
  
  <p>The latter is also depicted in the <a href="https://github.com/elastic/stack-docker" rel="nofollow noreferrer">README.md</a>:</p>
  
  <pre><code>sudo sysctl -w vm.max_map_count=262144
  </code></pre>
  
  <p>Once this was changed and </p>
  
  <pre><code>docker-compose -f setup.yml up --remove-orphans
  </code></pre>
  
  <p><a href="https://github.com/elastic/stack-docker/issues/73#issuecomment-476068864" rel="nofollow noreferrer">was run</a>, the logging continued:</p>
  
  <pre><code>setup_1  | setup_packetbeat       | Loading dashboards (Kibana must be running and reachable)
  setup_1  | setup_heartbeat        | Loaded dashboards
  setup_1  | setup_heartbeat        | Copy keystore to ./config dir
  setup_1  | setup_heartbeat exited with code 0
  setup_1  | setup_auditbeat        | Loaded dashboards
  setup_1  | setup_auditbeat        | Copy keystore to ./config dir
  setup_1  | setup_auditbeat exited with code 0
  setup_1  | setup_packetbeat       | Loaded dashboards
  setup_1  | setup_packetbeat       | Copy keystore to ./config dir
  setup_1  | setup_packetbeat exited with code 0
  setup_1  | setup_metricbeat       | Loaded dashboards
  setup_1  | setup_metricbeat       | Copy keystore to ./config dir
  setup_1  | setup_metricbeat exited with code 0
  setup_1  | setup_filebeat         | Loaded dashboards
  setup_1  | setup_filebeat         | Loaded machine learning job configurations
  setup_1  | setup_filebeat         | Copy keystore to ./config dir
  setup_1  | setup_filebeat exited with code 0
  setup_1  | Setup completed successfully. To start the stack please run:
  setup_1  |   docker-compose up -d
  setup_1  | 
  setup_1  | If you wish to remove the setup containers please run:
  setup_1  |  docker-compose -f docker-compose.yml -f docker-compose.setup.yml down --remove-orphans
  setup_1  | 
  setup_1  | You will have to re-start the stack after removing setup containers.
  setup_1  | 
  setup_1  | Your 'elastic' user password is: mnQ9c5FCGT09sRgHPnw27A==
  stack-docker_setup_1 exited with code 0
  </code></pre>
  
  <p>Subsequently, running <code>docker-compose up -d</code>, resulted in:</p>
  
  <pre><code>Recreating elasticsearch ... done
  Recreating kibana        ... done
  Creating logstash        ... done
  Creating apm_server      ... done
  Creating packetbeat      ... done
  Creating metricbeat      ... done
  Creating filebeat        ... done
  Creating heartbeat       ... done
  Creating auditbeat       ... done
  </code></pre>
  
  <p>Navigating to <a href="http://localhost:5601" rel="nofollow noreferrer">http://localhost:5601</a> returns the kibana UI.</p>
  
  <p><a href="https://i.sstatic.net/kIFlT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kIFlT.png" alt="enter image description here"></a></p>
  
Answers: CC BY-SA 4.0
Answers: 2019-12-03T15:50:01.090Z
Answers: 2019-12-09T10:25:39.880Z
Answers: 2019-12-09T10:25:39.880Z
Answers: 030
Body: <p><a href="https://github.com/elastic/stack-docker" rel="nofollow noreferrer">https://github.com/elastic/stack-docker</a></p>
  
  <p>Running <code>docker-compose -f setup.yml up</code> resulted in:</p>
  
  <pre><code>Creating network "stack-docker_default" with the default driver
  Pulling setup (docker/compose:1.21.2)...
  1.21.2: Pulling from docker/compose
  605ce1bd3f31: Pull complete
  c57f5dd9da06: Pull complete
  4869756a2c04: Pull complete
  Digest: sha256:6fb081a4ff825a3b9311aa532589bf98b3e9d3331e4f9de69fac31770c8cb108
  Status: Downloaded newer image for docker/compose:1.21.2
  Creating stack-docker_setup_1 ... done
  Attaching to stack-docker_setup_1
  setup_1  | Found orphan containers (stack-docker_setup_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
  Recreating setup_elasticsearch ... done
  Attaching to setup_elasticsearch
  setup_1  | setup_elasticsearch    | Determining if x-pack is installed...
  setup_1  | setup_elasticsearch    | === CREATE Keystore ===
  setup_1  | setup_elasticsearch    | Elastic password is: WCqGii/TGf2banI6JsJF4w==
  setup_1  | setup_elasticsearch    | Created elasticsearch keystore in /usr/share/elasticsearch/config
  setup_1  | setup_elasticsearch    | Setting bootstrap.password...
  setup_1  | setup_elasticsearch    | === CREATE SSL CERTS ===
  setup_1  | setup_elasticsearch    | Remove old ca zip...
  setup_1  | setup_elasticsearch    | Creating docker-cluster-ca.zip...
  setup_1  | setup_elasticsearch    | CA directory exists, removing...
  setup_1  | setup_elasticsearch    | Unzip ca files...
  setup_1  | setup_elasticsearch    | Archive:  /config/ssl/docker-cluster-ca.zip
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/ca/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/ca/ca.crt   
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/ca/ca.key   
  setup_1  | setup_elasticsearch    | Remove old docker-cluster.zip zip...
  setup_1  | setup_elasticsearch    | Create cluster certs zipfile...
  setup_1  | setup_elasticsearch    | Unzipping cluster certs zipfile...
  setup_1  | setup_elasticsearch    | Archive:  /config/ssl/docker-cluster.zip
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/docker-cluster/elasticsearch/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/elasticsearch/elasticsearch.crt  
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/elasticsearch/elasticsearch.key  
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/docker-cluster/kibana/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/kibana/kibana.crt  
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/kibana/kibana.key  
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/docker-cluster/logstash/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/logstash/logstash.crt  
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/logstash/logstash.key  
  setup_1  | setup_elasticsearch    | Move logstash certs to logstash config dir...
  setup_1  | setup_elasticsearch    | Move kibana certs to kibana config dir...
  setup_1  | setup_elasticsearch    | Move elasticsearch certs to elasticsearch config dir...
  setup_1  | setup_elasticsearch exited with code 0
  setup_1  | Found orphan containers (stack-docker_setup_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
  setup_1  | Pulling setup_kibana (docker.elastic.co/kibana/kibana:6.6.0)...
  setup_1  | 6.6.0: Pulling from kibana/kibana
  setup_1  | Digest: sha256:7c6eadb13667e36d21b7e96809a02d14527c15bbfc5b92631168a58ed5f9fd33
  setup_1  | Status: Downloaded newer image for docker.elastic.co/kibana/kibana:6.6.0
  setup_1  | Pulling setup_logstash (docker.elastic.co/logstash/logstash:6.6.0)...
  setup_1  | 6.6.0: Pulling from logstash/logstash
  setup_1  | Digest: sha256:5fd22fa584ae6bd9b9e2d23014f23b415ccf8c66cba35cbacb68999f7ee4e2f5
  setup_1  | Status: Downloaded newer image for docker.elastic.co/logstash/logstash:6.6.0
  Recreating elasticsearch ... done
  Creating setup_logstash  ... done
  Creating setup_kibana    ... done
  Attaching to setup_logstash, setup_kibana
  setup_1  | setup_logstash         | -rw-rw-r-- 1 root root 1200 Dec  3 15:35 /usr/share/logstash/config/ca/ca.crt
  setup_1  | setup_kibana           | -rw-rw-r-- 1 root root 1200 Dec  3 15:35 /usr/share/kibana/config/ca/ca.crt
  </code></pre>
  
  <p>and navigating to <a href="http://localhost:5601/" rel="nofollow noreferrer">http://localhost:5601/</a> does not return anything.</p>
  
  <p>When <code>docker-compose up</code> is run then it fails:</p>
  
  <pre><code>Creating logstash        ... error
  Creating kibana          ... 
  
  ERROR: for logstash  Cannot create container for service logstash: invalid mount config for type "binCreating kibana          ... error
  
  ERROR: for kibana  Cannot create container for service kibana: invalid mount config for type "bind": bind source path does not exist: /home/ben/dev/stack-docker/config/kibana/kibana.keystore
  
  ERROR: for logstash  Cannot create container for service logstash: invalid mount config for type "bind": bind source path does not exist: /home/ben/dev/stack-docker/config/logstash/logstash.keystore
  
  ERROR: for kibana  Cannot create container for service kibana: invalid mount config for type "bind": bind source path does not exist: /home/ben/dev/stack-docker/config/kibana/kibana.keystore
  ERROR: Encountered errors while bringing up the project.
  </code></pre>
  
Tags: <docker><elastic>
Title: How to get the elastic stack-docker running on a laptop?
UserDisplayName: 030
ThreadText: # How to get the elastic stack-docker running on a laptop?
  
  (Asked by: username_0 on 2019-12-03)
  
  <https://github.com/elastic/stack-docker>
  
  Running `docker-compose -f setup.yml up` resulted in:
  
  ```
  Creating network "stack-docker_default" with the default driver
  Pulling setup (docker/compose:1.21.2)...
  1.21.2: Pulling from docker/compose
  605ce1bd3f31: Pull complete
  c57f5dd9da06: Pull complete
  4869756a2c04: Pull complete
  Digest: sha256:6fb081a4ff825a3b9311aa532589bf98b3e9d3331e4f9de69fac31770c8cb108
  Status: Downloaded newer image for docker/compose:1.21.2
  Creating stack-docker_setup_1 ... done
  Attaching to stack-docker_setup_1
  setup_1  | Found orphan containers (stack-docker_setup_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
  Recreating setup_elasticsearch ... done
  Attaching to setup_elasticsearch
  setup_1  | setup_elasticsearch    | Determining if x-pack is installed...
  setup_1  | setup_elasticsearch    | === CREATE Keystore ===
  setup_1  | setup_elasticsearch    | Elastic password is: WCqGii/TGf2banI6JsJF4w==
  setup_1  | setup_elasticsearch    | Created elasticsearch keystore in /usr/share/elasticsearch/config
  setup_1  | setup_elasticsearch    | Setting bootstrap.password...
  setup_1  | setup_elasticsearch    | === CREATE SSL CERTS ===
  setup_1  | setup_elasticsearch    | Remove old ca zip...
  setup_1  | setup_elasticsearch    | Creating docker-cluster-ca.zip...
  setup_1  | setup_elasticsearch    | CA directory exists, removing...
  setup_1  | setup_elasticsearch    | Unzip ca files...
  setup_1  | setup_elasticsearch    | Archive:  /config/ssl/docker-cluster-ca.zip
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/ca/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/ca/ca.crt   
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/ca/ca.key   
  setup_1  | setup_elasticsearch    | Remove old docker-cluster.zip zip...
  setup_1  | setup_elasticsearch    | Create cluster certs zipfile...
  setup_1  | setup_elasticsearch    | Unzipping cluster certs zipfile...
  setup_1  | setup_elasticsearch    | Archive:  /config/ssl/docker-cluster.zip
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/docker-cluster/elasticsearch/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/elasticsearch/elasticsearch.crt  
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/elasticsearch/elasticsearch.key  
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/docker-cluster/kibana/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/kibana/kibana.crt  
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/kibana/kibana.key  
  setup_1  | setup_elasticsearch    |    creating: /config/ssl/docker-cluster/logstash/
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/logstash/logstash.crt  
  setup_1  | setup_elasticsearch    |   inflating: /config/ssl/docker-cluster/logstash/logstash.key  
  setup_1  | setup_elasticsearch    | Move logstash certs to logstash config dir...
  setup_1  | setup_elasticsearch    | Move kibana certs to kibana config dir...
  setup_1  | setup_elasticsearch    | Move elasticsearch certs to elasticsearch config dir...
  setup_1  | setup_elasticsearch exited with code 0
  setup_1  | Found orphan containers (stack-docker_setup_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
  setup_1  | Pulling setup_kibana (docker.elastic.co/kibana/kibana:6.6.0)...
  setup_1  | 6.6.0: Pulling from kibana/kibana
  setup_1  | Digest: sha256:7c6eadb13667e36d21b7e96809a02d14527c15bbfc5b92631168a58ed5f9fd33
  setup_1  | Status: Downloaded newer image for docker.elastic.co/kibana/kibana:6.6.0
  setup_1  | Pulling setup_logstash (docker.elastic.co/logstash/logstash:6.6.0)...
  setup_1  | 6.6.0: Pulling from logstash/logstash
  setup_1  | Digest: sha256:5fd22fa584ae6bd9b9e2d23014f23b415ccf8c66cba35cbacb68999f7ee4e2f5
  setup_1  | Status: Downloaded newer image for docker.elastic.co/logstash/logstash:6.6.0
  Recreating elasticsearch ... done
  Creating setup_logstash  ... done
  Creating setup_kibana    ... done
  Attaching to setup_logstash, setup_kibana
  setup_1  | setup_logstash         | -rw-rw-r-- 1 root root 1200 Dec  3 15:35 /usr/share/logstash/config/ca/ca.crt
  setup_1  | setup_kibana           | -rw-rw-r-- 1 root root 1200 Dec  3 15:35 /usr/share/kibana/config/ca/ca.crt
  
  ```
  
  and navigating to <http://localhost:5601/> does not return anything.
  
  When `docker-compose up` is run then it fails:
  
  ```
  Creating logstash        ... error
  Creating kibana          ... 
  
  ERROR: for logstash  Cannot create container for service logstash: invalid mount config for type "binCreating kibana          ... error
  
  ERROR: for kibana  Cannot create container for service kibana: invalid mount config for type "bind": bind source path does not exist: /home/ben/dev/stack-docker/config/kibana/kibana.keystore
  
  ERROR: for logstash  Cannot create container for service logstash: invalid mount config for type "bind": bind source path does not exist: /home/ben/dev/stack-docker/config/logstash/logstash.keystore
  
  ERROR: for kibana  Cannot create container for service kibana: invalid mount config for type "bind": bind source path does not exist: /home/ben/dev/stack-docker/config/kibana/kibana.keystore
  ERROR: Encountered errors while bringing up the project.
  
  ```
  
  **Tags:** docker, elastic
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-12-03. Score: 0 | Accepted answer
  
  Elastic was not able to start. The logging indicated:
  
  ```
  [2019-12-09T10:22:15,124][INFO ][o.e.b.BootstrapChecks    ] [kViKuCL] bound
  or publishing to a non-loopback address, enforcing bootstrap checks
  ERROR: [1] bootstrap checks failed
  [1]: max virtual memory areas vm.max_map_count [65530] is too low,
  increase to at least [262144]
  
  ```
  
  The latter is also depicted in the [README.md](https://github.com/elastic/stack-docker):
  
  ```
  sudo sysctl -w vm.max_map_count=262144
  
  ```
  
  Once this was changed and
  
  ```
  docker-compose -f setup.yml up --remove-orphans
  
  ```
  
  [was run](https://github.com/elastic/stack-docker/issues/73#issuecomment-476068864), the logging continued:
  
  ```
  setup_1  | setup_packetbeat       | Loading dashboards (Kibana must be running and reachable)
  setup_1  | setup_heartbeat        | Loaded dashboards
  setup_1  | setup_heartbeat        | Copy keystore to ./config dir
  setup_1  | setup_heartbeat exited with code 0
  setup_1  | setup_auditbeat        | Loaded dashboards
  setup_1  | setup_auditbeat        | Copy keystore to ./config dir
  setup_1  | setup_auditbeat exited with code 0
  setup_1  | setup_packetbeat       | Loaded dashboards
  setup_1  | setup_packetbeat       | Copy keystore to ./config dir
  setup_1  | setup_packetbeat exited with code 0
  setup_1  | setup_metricbeat       | Loaded dashboards
  setup_1  | setup_metricbeat       | Copy keystore to ./config dir
  setup_1  | setup_metricbeat exited with code 0
  setup_1  | setup_filebeat         | Loaded dashboards
  setup_1  | setup_filebeat         | Loaded machine learning job configurations
  setup_1  | setup_filebeat         | Copy keystore to ./config dir
  setup_1  | setup_filebeat exited with code 0
  setup_1  | Setup completed successfully. To start the stack please run:
  setup_1  |   docker-compose up -d
  setup_1  | 
  setup_1  | If you wish to remove the setup containers please run:
  setup_1  |  docker-compose -f docker-compose.yml -f docker-compose.setup.yml down --remove-orphans
  setup_1  | 
  setup_1  | You will have to re-start the stack after removing setup containers.
  setup_1  | 
  setup_1  | Your 'elastic' user password is: mnQ9c5FCGT09sRgHPnw27A==
  stack-docker_setup_1 exited with code 0
  
  ```
  
  Subsequently, running `docker-compose up -d`, resulted in:
  
  ```
  Recreating elasticsearch ... done
  Recreating kibana        ... done
  Creating logstash        ... done
  Creating apm_server      ... done
  Creating packetbeat      ... done
  Creating metricbeat      ... done
  Creating filebeat        ... done
  Creating heartbeat       ... done
  Creating auditbeat       ... done
  
  ```
  
  Navigating to <http://localhost:5601> returns the kibana UI.
  
  [![enter image description here](https://i.sstatic.net/kIFlT.png)](https://i.sstatic.net/kIFlT.png)
  
  
  ---
  
  