windows系统通过docker安装es报vm.max

windows系统通过docker安装es报vm.max,第1张

windows系统通过docker安装es报vm.max 启动的时候报以下错误

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

 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5655950.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存