windows系统通过docker安装es报vm.max_map_count [65530] is too low
启动的时候报以下错误docker-compos.yml配置es1:image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2#sysctls:#- vm.max_map_count=262144container_name: es01environment:- node.name=es01- cluster.name=es-docker-c
启动的时候报以下错误
docker-compos.yml配置
es1:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
# sysctls:
# - vm.max_map_count=262144
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=-Xms256m -Xmx256m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9201:9200"
- "9301:9300"
es2:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
# sysctls:
# - vm.max_map_count=262144
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=-Xms256m -Xmx256m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9202:9200"
- "9302:9300"
es3:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
# sysctls:
# - vm.max_map_count=262144
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=-Xms256m -Xmx256m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9203:9200"
- "9303:9300"
es03 | ERROR: [1] bootstrap checks failed
es03 | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
es03 | {"type": "server", "timestamp": "2021-12-11T11:13:50,536Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-docker-cluster", "node.name": "es03", "message": "stopping ..." }
es03 | {"type": "server", "timestamp": "2021-12-11T11:13:50,604Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-docker-cluster", "node.name": "es03", "message": "stopped" }
es03 | {"type": "server", "timestamp": "2021-12-11T11:13:50,604Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-docker-cluster", "node.name": "es03", "message": "closing ..." }
es03 | {"type": "server", "timestamp": "2021-12-11T11:13:50,651Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-docker-cluster", "node.name": "es03", "message": "closed" }
es03 | {"type": "server", "timestamp": "2021-12-11T11:13:50,659Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "es-docker-cluster", "node.name": "es03", "message": "Native controller process has stopped - no new native processes can be started" }
es01 exited with code 78
es03 exited with code 78
解决办法:
输入以下命令
wsl -d docker-desktop
sysctl -w vm.max_map_count=262144
更多推荐
所有评论(0)