gpt4 book ai didi

docker - Docker Swarm中的Elasticsearch 6.4:为Elasticsearch进程请求了内存锁定,但内存未锁定

转载 作者:行者123 更新时间:2023-12-02 19:05:46 25 4
gpt4 key购买 nike

我正在尝试在Docker Swarm中运行Elasticsearch。
这是我的docker-compose文件:

version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2
networks:
- swarm_network
ports:
- "9200:9200"
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
deploy:
mode: replicated
replicas: 1
resources:
limits:
memory: 1000M

我收到此错误:
错误:[1]引导检查失败
[1]:请求 flex 搜索过程进行内存锁定,但内存未锁定

有谁知道为什么这个错误以及如何解决呢?

最佳答案

设置LimitMEMLOCK=infinity到docker.service单元对我来说工作正常(在ubuntu服务器1804上运行的docker 18.06.1-ce)

(来源:ozswang on https://github.com/FusionAuth/fusionauth-containers/issues/1)

echo -e "[Service]\nLimitMEMLOCK=infinity" | SYSTEMD_EDITOR=tee systemctl edit docker.service

systemctl daemon-reload

systemctl restart docker

关于docker - Docker Swarm中的Elasticsearch 6.4:为Elasticsearch进程请求了内存锁定,但内存未锁定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52858483/

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