onebirdrocks / geektime-ELK

ELK Training
1.21k stars 2.54k forks source link

为啥单机版的,还是集群的,docker-compose都启动不了,集群版的是kibina启动不起来,单机版是Kibana server is not ready yet #13

Open Oject opened 4 years ago

zhulinpinyu commented 4 years ago

试试这个

version: '2.2'
services:
  cerebro:
    image: lmenezes/cerebro:0.8.3
    container_name: cerebro
    ports:
      - 9000:9000
    command:
      - -Dhosts.0.host=http://es01:9200
    networks:
      - elk_network
  kibana:
    image: docker.elastic.co/kibana/kibana:7.2.1
    container_name: kibana
    environment:
      - ELASTICSEARCH_HOSTS=http://es01:9200
      - XPACK_GRAPH_ENABLED=true
      - TIMELION_ENABLED=true
      - XPACK_MONITORING_COLLECTION_ENABLED=true
    ports:
      - 5601:5601
    networks:
      - elk_network
  elasticsearch_01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.2.1
    container_name: es01
    environment:
      - node.name=es_node_01
      - discovery.seed_hosts=es02
      - cluster.initial_master_nodes=es01,es02
      - cluster.name=lixiang_docker_cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata01:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - elk_network
  elasticsearch_02:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.2.1
    container_name: es02
    environment:
      - node.name=es_node_02
      - discovery.seed_hosts=es01
      - cluster.initial_master_nodes=es01,es02
      - cluster.name=lixiang_docker_cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata02:/usr/share/elasticsearch/data
    networks:
      - elk_network

volumes:
  esdata01:
    driver: local
  esdata02:
    driver: local

networks:
  elk_network:
    driver: bridge
MistRay commented 4 years ago

你不是一个人。。。

MistRay commented 4 years ago

@zhulinpinyu 你知道案例里的docker-compose问题出在哪里么?

qizg commented 4 years ago

有可能报这个错. max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 照这个修改一下 https://www.cnblogs.com/yidiandhappy/p/7714489.html

yzhack commented 3 years ago

version: '2.2' services: cerebro: image: lmenezes/cerebro:0.8.3 container_name: cerebro ports:

volumes: es72data1: driver: local es72data2: driver: local

networks: es72net: driver: bridge