Docker启动报错"Job for docker.service failed because a configured resource limit was exceeded. See “systemctl status docker.service” and “journalctl -xe” for details."
配置docker跨主机集群之flannel之后第二天启动docker报错"Job for docker.service failed because a configured resource limit was exceeded. See “systemctl status docker.service” and “journalctl -xe” for details."
修改Docker启动参数
vim /lib/systemd/system/docker.service
配置docker跨主机集群时在docker的配置文件中作了修改
1.[Service]节中,指定启动参数所在的文件位置(这个配置是新增的) EnvironmentFile=/run/flannel/docker_opts.env 2. 在原有ExecStart后面添加$DOCKER_OPTS 修改前 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock 2.修改后 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock $DOCKER_OPTS 将这两个配置删除,运行systemctl daemon-reload后启动docker
daemon.json
vim /etc/docker/daemon.json
{"registry-mirrors":["https://ykxoezox.mirror.aliyuncs.com"]}
也有可能是daemon.json文件的格式问题(多个逗号或者少个])
卸载重装
运行卸载docker命令后,运行yum list installed | grep docker查看是否有残余
若还是解决不了,可参考https://blog.csdn.net/m0_46191508/article/details/107459939
|