记 Docker 运行 Logstash out of memory 问题

知了小站
2022-08-06 / 0 评论 / 1,118 阅读

最近在 Docker 容器上搭建 Zookeeper+Kafka+Logstash+Elasticsearch+Kibana 日志分析系统,在运行 Logstash 和 Elasticsearch 时遇到了如下错误:

library initialization failed - unable to allocate file descriptor table - out of memorylibrary
initialization failed - unable to allocate file descriptor table - out of memory

l6hlzlt2.png

在这里记录下解决方案。

解决方案

通过重写 Docker 的 ExecStart 的参数解决

sudo systemctl edit docker

进入后,添加或者修改对应参数

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --default-ulimit nofile=65536:65536 -H fd://

最后重启 Docker

sudo systemctl daemon-reload
sudo systemctl restart docker

参考:https://stackoverflow.com/questions/68776387/docker-library-initialization-failed-unable-to-allocate-file-descriptor-tabl

本文共 69 个字数,平均阅读时长 ≈ 1分钟
2

打赏

评论 (0)

取消