docker启动问题排查:the following directives are specified both as a flag and in the configuration file

 今天同事突然反馈docker挂了。好好地怎么挂了?问了问,同事加了个daemon.json文件,用于从私有仓库中拉镜像,文件大概长这样,主要是为了那行insercure-registries

docker启动问题排查:the following directives are specified both as a flag and in the configuration file

 

 

 看了看好像也没啥问题。先看看docker的状态

docker启动问题排查:the following directives are specified both as a flag and in the configuration file

 

 

  没毛病,是挂的。再看看日志。

docker启动问题排查:the following directives are specified both as a flag and in the configuration file

 

 

 

unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: log-opts: (from flag: map[max-size:50m max-file:5], from file: map[max-size:100m]) 

 配置冲突了。那解决问题倒是简单,冲突的配置删掉就好了。有点奇怪的就是以前也这么配置过,为啥以前好像没见过这个冲突。看看docker.service咋写的

docker启动问题排查:the following directives are specified both as a flag and in the configuration file

 

 

 哎,好像跟以前不大一样,引入了很多变量。记得其他集群和网上能看到的大多数是这个格式“ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock”

 去看看这些变量是啥。找了找变量路径在docker.service同级目录下的docker.service.d目录中

docker启动问题排查:the following directives are specified both as a flag and in the configuration file

 

  啊这。。。再看看docker版本

docker启动问题排查:the following directives are specified both as a flag and in the configuration file

 

 行吧行吧,你赢了

 

上一篇:中高级工程师Java开发!怎么使用rke安装k8s集群


下一篇:Centos7 RKE部署高可用k8s集群