gpt4 book ai didi

docker - 使用XPack设置ElasticSearch和Kibana图像

转载 作者:行者123 更新时间:2023-12-02 21:16:25 24 4
gpt4 key购买 nike

我尝试使用官方的Kibana和ElasticSearch图像,但是它们只是退出并显示错误消息。启动后几秒钟,容器的状态如下所示:

     Name             State               
------------------------------
elasticsearch Exit 1
elasticsearch1 Exit 78
mongotest_kafka_1 Up
mongotest_kibana_1 Exit 1

图像之一的错误消息:
elasticsearch1    | ERROR: [1] bootstrap checks failed
elasticsearch1 | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch1 | [2018-06-04T09:37:17,274][INFO ][o.e.n.Node ] [L0Tp7dx] stopping ...
elasticsearch1 | [2018-06-04T09:37:17,289][INFO ][o.e.n.Node ] [L0Tp7dx] stopped
elasticsearch1 | [2018-06-04T09:37:17,289][INFO ][o.e.n.Node ] [L0Tp7dx] closing ...
elasticsearch1 | [2018-06-04T09:37:17,296][INFO ][o.e.n.Node ] [L0Tp7dx] closed
elasticsearch1 | [2018-06-04T09:37:17,298][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started

我不确定docker-compose.yml中的某些配置是否错误:
version: '3.3'
services:
kafka:
image: spotify/kafka
ports:
- "9092:9092"
environment:
- ADVERTISED_HOST=localhost
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- esnet
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata2:/usr/share/elasticsearch/data
networks:
- esnet
kibana:
image: docker.elastic.co/kibana/kibana:6.2.4
environment:
SERVER_NAME: kibana
SERVER_NAME: "0"
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_USERNAME: elastic
ELASTICSEARCH_PASSWORD: changeme
XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED: "true"
networks:
- esnet
volumes:
esdata1:
driver: local
esdata2:
driver: local

networks:
esnet:

最佳答案

这需要在docker主机上进行配置( flex 堆栈在默认Linux主机安装之上具有一些要求)。 Elastic has documentation on this process,包括虚拟内存设置。对于此特定错误,可以运行以下命令:

sysctl -w vm.max_map_count=262144

您将需要在/etc/sysctl.conf中进行配置,以便该设置在重新启动后仍然有效。

关于docker - 使用XPack设置ElasticSearch和Kibana图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50677733/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com