daemon.json添加“exec-opts“: [“native.cgroupdriver=systemd“]后无法启动的问题

简介: daemon.json添加“exec-opts“: [“native.cgroupdriver=systemd“]后无法启动的问题

报错引流

Job for docker.service failed because the control process exited with error

docker修改"exec-opts": [“native.cgroupdriver=systemd”]后启动不了

the following directives are specified both as a flag and in the configura…

前言

在安装k8s集群时,需要把docker的cgroup改成systemd,修改完后报错,经百度,谷歌,发现没有一篇解决这个问题的文章,故写此文,帮助跟我一样的小白

解决

启动失败原因:直接启动docker会报错,因为docker.service里有一条配置,和刚才添加的"exec-opts"冲突了

解决方案:

# 解决报错
# vi /lib/systemd/system/docker.service
# 找到并删除下面这句话,保存退出,即可解决
# --exec-opt native.cgroupdriver=cgroupfs \
[root@master ~]# systemctl daemon-reload
[root@master ~]# systemctl restart docker



目录
相关文章
|
8月前
|
安全 Linux 数据安全/隐私保护
docker运行报错docker: Error response from daemon: AppArmor enabled on system but the docker-default prof
docker运行报错docker: Error response from daemon: AppArmor enabled on system but the docker-default prof
501 0
|
应用服务中间件 nginx
Mac Nginx nginx: [emerg] mkdir() “/usr/local/var/run/nginx/client_body_temp“ failed ...
Mac Nginx nginx: [emerg] mkdir() “/usr/local/var/run/nginx/client_body_temp“ failed ...
328 2
|
1天前
|
关系型数据库 MySQL Docker
docker pull mysql:8.0.26提示Error response from daemon: Get “https://registry-1.docker.io/v2/“: EOF错误
docker pull mysql:8.0.26提示Error response from daemon: Get “https://registry-1.docker.io/v2/“: EOF错误
|
4月前
|
Oracle Java 关系型数据库
Linux下JDK环境的配置及 bash: /usr/local/java/bin/java: cannot execute binary file: exec format error问题的解决
如果遇到"exec format error"问题,文章建议先检查Linux操作系统是32位还是64位,并确保安装了与系统匹配的JDK版本。如果系统是64位的,但出现了错误,可能是因为下载了错误的JDK版本。文章提供了一个链接,指向Oracle官网上的JDK 17 Linux版本下载页面,并附有截图说明。
Linux下JDK环境的配置及 bash: /usr/local/java/bin/java: cannot execute binary file: exec format error问题的解决
|
关系型数据库 MySQL Devops
docker容器刚启动就停止 — 运行mysql 报错 mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
docker容器刚启动就停止 — 运行mysql 报错 mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
1206 0
|
4月前
|
Unix Shell Linux
5-15|Docker报错OCI runtime exec failed: exec failed: unable to start container process: exec: “/bin/ba
5-15|Docker报错OCI runtime exec failed: exec failed: unable to start container process: exec: “/bin/ba
|
Shell Docker 容器
Docker - 解决同步容器与主机时间报错:Error response from daemon: Error processing tar file(exit status 1): invalid symlink "/usr/share/zoneinfo/UTC" -> "../usr/share/zoneinfo/Asia/Shanghai"
Docker - 解决同步容器与主机时间报错:Error response from daemon: Error processing tar file(exit status 1): invalid symlink "/usr/share/zoneinfo/UTC" -> "../usr/share/zoneinfo/Asia/Shanghai"
1261 0
Docker - 解决同步容器与主机时间报错:Error response from daemon: Error processing tar file(exit status 1): invalid symlink "/usr/share/zoneinfo/UTC" -> "../usr/share/zoneinfo/Asia/Shanghai"
|
关系型数据库 MySQL Docker
Docker - 运行 Mysql 容器后报错:[ERROR] --initialize specified but the data directory has files in it. Aborting.
Docker - 运行 Mysql 容器后报错:[ERROR] --initialize specified but the data directory has files in it. Aborting.
1609 0
Docker - 运行 Mysql 容器后报错:[ERROR] --initialize specified but the data directory has files in it. Aborting.
|
7月前
|
Unix Docker 容器
使用docker 启动naocs 报错出现:standard_init_linux.go:241: exec user process caused "exec format error"
```markdown Error in Docker container startup: "standard_init_linux.go:241: exec user process caused \"exec format error\"". Occurred at 2024-06-29 09:26:19.910, followed by a failed hook with a syslog delivery error at 09:27:20.193. Seeking solutions from experts. ```
|
应用服务中间件 nginx
Mac Nginx nginx: [error] open() “/usr/local/var/run/nginx.pid“
Mac Nginx nginx: [error] open() “/usr/local/var/run/nginx.pid“
121 1