Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.7K
Visualizações
ElasticSearch in Windows docker image vm max map count

I am new to Docker and Elasticsearch. I am using a Windows 7 machine. I am using docker-compose up to bring up the docker container. My yml file has

elasticsearch:
  image: elasticsearch:5.1.1
  environment:
    ES_JAVA_OPTS: "-Xms1g -Xmx1g"

along with other linked images.
I am using docker to bring up the elasticsearch image and when I do so I get the following error

[36melasticsearch_1   |←[0m ERROR: bootstrap checks failed
[36melasticsearch_1   |←[0m max virtual memory areas vm.max_map_count [65530]  is too low, increase to at least [262144]
[36melasticsearch_1   |←[0m [2017-02-08T11:06:51,752][INFO ][o.e.n.Node

I googled for a solution and everywhere they suggest to use sudo sysctl vm.max_map_count=262144, but in Windows sysctl is not available. No clear steps are given for Windows.

Some other Docker images are up and running on my machine so Docker is working.

Can someone give any clues to solve this issue?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

I have been stuck for months on this problem, the solution is launch the following commands on cmd.exe (try Powershell or Bash if cmd doesn't work), as stated in the official Elasticsearch documentation:

1) wsl -d docker-desktop
2) sysctl -w vm.max_map_count=262144

And you are ready to start Elasticsearch!

over 4 years ago · Santiago Trujillo Relatório

0

Currently, following this issue, the way to make it work is by wsl -d docker-desktop and sysctl -w vm.max_map_count=262144 there.

Some people got it to work persistently by echo "vm.max_map_count = 262144" > /etc/sysctl.d/99-docker-desktop.conf or echo -e "\nvm.max_map_count = 262144\n" >> /etc/sysctl.d/00-alpine.conf, but none of these worked for me.

over 4 years ago · Santiago Trujillo Relatório

0

Elasticsearch have a fix for this.

This worked for me on Win 10 Pro Version 10.0.19042.685, Docker Engine v20.10.0 Using ES 7.10

The problem is on the host linux machine (WSL2) not the containers.

see section Windows with Docker Desktop WSL 2 backend https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_set_vm_max_map_count_to_at_least_262144

-d distribution (eg not ubuntu)

wsl -d docker-desktop
sysctl -w vm.max_map_count=262144

After that my 3 node cluster docker-compose launched successfully.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda