# Running up Cluster in Docker with TLS on a Mac - Issues

**URL:** <https://discuss.elastic.co/t/running-up-cluster-in-docker-with-tls-on-a-mac-issues/283748>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, docker\
**Created:** [September 9, 2021, 7:50am UTC](https://discuss.elastic.co/t/running-up-cluster-in-docker-with-tls-on-a-mac-issues/283748 "2021-09-09T07:50:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neil6323](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neil6323/32/92234_2.png) [@neil6323](https://discuss.elastic.co/u/neil6323)\
**Post date:** [September 9, 2021, 7:50am UTC](https://discuss.elastic.co/t/running-up-cluster-in-docker-with-tls-on-a-mac-issues/283748/1 "2021-09-09T07:50:16Z")

</div>

I'm trying to run up an ES cluster which has TLS using Docker on a Mac. I'm using the instructions given in [https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)

Versions are all latest available.

MacOS (Intel): 11.5.2  
Docker: 4.0.0  
Elasticsearch/Kibana: 7.14.1

Step 3 is successful (it says done - but no other output. From memory I did get per-node results when I ran the same process in Linux and Docker).  
Step 4 - when I try to bring up the cluster, nodes es02 and es03 start running but then exit.

When I look back at the logs from node ES02 I can see the following which may suggest that step 3 was not successful.

`ElasticsearchSecurityException[failed to load SSL configuration [xpack.security.transport.ssl]]; nested: ElasticsearchException[failed to initialize SSL KeyManager - key file [/usr/share/elasticsearch/config/certificates/es02/es02.key] does not exist]; nested: NoSuchFileException[/usr/share/elasticsearch/config/certificates/es02/es02.key];`'

I've tried this setup more than once. New files (re-copied from the Elastic site) and new folders and I get the same result.

Also when I ran the process through with Linux I had to change the `sysctl -w vm.max_map_count=262144` to complete the process. However, if I follow the instructions for the Mac, to rule this out being an issue, using `screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty`, I get an error basically that this file is not available. There are some references to this, for example [https://github.com/docker/for-mac/issues/4822](https://github.com/docker/for-mac/issues/4822). Is there still a requirement to amend the `vm.max_map_count` for a Mac and if so is there another way to achieve this?

Thanks  
Neil

---

<div class="post-metadata">

**Author:** ![neil6323](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neil6323/32/92234_2.png) [@neil6323](https://discuss.elastic.co/u/neil6323)\
**Post date:** [September 10, 2021, 6:27am UTC](https://discuss.elastic.co/t/running-up-cluster-in-docker-with-tls-on-a-mac-issues/283748/2 "2021-09-10T06:27:03Z")

</div>

An update. I've managed to use the instructions to get past step 4 using version 7.6.2 (Docker and MacOS versions remain the same as before). I believe the issue is with step 3 when certs are created. When it works, there is output related to each host.

Step 3 output when successful using version 7.6.2.

```auto
% docker-compose -f create-certs.yml run --rm create_certs

Creating network "es7_6_2_elastic" with driver "bridge"
Creating volume "es7_6_2_certs" with local driver
Pulling create_certs (docker.elastic.co/elasticsearch/elasticsearch:7.6.2)...
7.6.2: Pulling from elasticsearch/elasticsearch
c808caf183b6: Pull complete
d6caf8e15a64: Pull complete
b0ba5f324e82: Pull complete
d7e8c1e99b9a: Pull complete
85c4d6c81438: Pull complete
3119218fac98: Pull complete
914accf214bb: Pull complete
Digest: sha256:59342c577e2b7082b819654d119f42514ddf47f0699c8b54dc1f0150250ce7aa
Status: Downloaded newer image for docker.elastic.co/elasticsearch/elasticsearch:7.6.2
Creating es7_6_2_create_certs_run ... done
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Archive: /certs/bundle.zip
   creating: /certs/ca/
  inflating: /certs/ca/ca.crt        
   creating: /certs/es01/
  inflating: /certs/es01/es01.crt    
  inflating: /certs/es01/es01.key    
   creating: /certs/es02/
  inflating: /certs/es02/es02.crt    
  inflating: /certs/es02/es02.key    
   creating: /certs/es03/
  inflating: /certs/es03/es03.crt    
  inflating: /certs/es03/es03.key    
   creating: /certs/kib01/
  inflating: /certs/kib01/kib01.crt  
  inflating: /certs/kib01/kib01.key  

```

I tried again with 7.14.1 and 8.0.0-alpha and neither work when doing a Docker/Mac deployment. Want to try functionality that needs 7.14 so will stick with Linux Docker standup.

---

<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:** [October 8, 2021, 6:27am UTC](https://discuss.elastic.co/t/running-up-cluster-in-docker-with-tls-on-a-mac-issues/283748/3 "2021-10-08T06:27:08Z")

</div>

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