docker compose 启用elasticSearch 报错:Failed to created node environment

elasticSearch · Fecmall · 于 1年前 发布 · 2213 次阅读

docker compose 启用elasticSearch 报错:Failed to created node environment

elasticsearch1:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3
    container_name: elasticsearch1
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
      - "ES_JAVA_OPTS=-Xms128m -Xmx128m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./db/elasticsearch/data:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - code-network

这是因为elasticSearch的账户不是root,因此,需要将 ./db/elasticsearch/data 设置为可写

共收到 1 条回复
Fecmall#11年前 0 个赞

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

[root@localhost ~]# sysctl -w vm.max_map_count=262144

[root@localhost ~]# sysctl -a|grep vm.max_map_count
vm.max_map_count = 262144

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics