惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - netcorner

docker容器访问上层宿主主机的方式 svn: Server SSL certificate verification failed certificate issued for a different hostname springboot 参数校验 windows批处理 打开exe后关闭cmd 分页得到查询总数的方法 mysql input[type="file"] change事件第二次不触发 小程序post请求,后台接收不到数据的解决方法 Docker安装Kibana Docker安装ElasticSearch Docker安装Redis Docker安装Tomcat Docker安装 Nginx mysql服务设置远程连接 解决1251 client does not support ..问题 Docker 安装MySQL容器 安装Docker 图形界面管理工具 -- Portainer Dockfile 编写示例(将 jar 制作成容器) Docker 常用命令集 云服务器CentOS安装Docker CentOS7离线安装Docker
docker 启动报错 library initialization failed - unable to allocate file descriptor table - out of memory
netcorner · 2023-12-23 · via 博客园 - netcorner

docker 启动报错

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

1.报错日志

library initialization failed - unable to allocate file descriptor table - out of memory/cm-server/aiboxCloud-web/boot/entrypoint.sh: line 2: 6 Aborted (core dumped) java -Xms1024m -Xmx2048m -jar -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/cm-server/logs/gc-%t.log -Dfile.encoding=utf-8 -Duser.timezone=GMT+8 -XX:MaxDirectMemorySize=512m .runtime/modular-bpm-runtime.jar

2.原因:

(1) LimitNOFILE=infinity 虽然是不限制,但是在systemctl版本小于234的时候不生效,查看systemctl版本:systemctl --version

(2) docker容器的ulimit太小了,有文档说太大也不行

3.解决方法

#修改/lib/systemd/system/docker.service文件

LimitCORE=infinity

LimitNOFILE=infinity

LimitNPROC=infinity

改成

LimitCORE=65535

LimitNOFILE=65535

LimitNPROC=65535

systemctl daemon-reload

systemctl restart docker

#重启docker服务

解决方法二

问题
因运存不足无法给进程分配更多的文件句柄数而异常退出

原运行指令
docker run  -d -p 8080:8080 docker-test:v1.0
1
改为
docker run --ulimit nofile=1024 -d -p 8080:8080 docker-test:v1.0

解决方法三


在 /etc/systemd/system/ 目录下, 创建 docker.service.d 目录
进入该目录,创建一个文件,名为 docker.conf
在文件中加入以下配置:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --default-ulimit nofile=65535:65535 -H fd://