1.启动时报错查看日志发现

# journalctl -xe

Failed to listen on Docker Socket for the API.

查找socket这个配置文件,修改如下

# find / -name docker.socket
/etc/systemd/system/sockets.target.wants/docker.socket

/lib/systemd/system# vim docker.socket

[Unit]
Description=Docker Socket for the API

[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=root  # 这里原来是docker改成root即可,保存退出

[Install]
WantedBy=sockets.target

# systemctl enable docker.service

# systemctl enable docker.socket

再次重启docker,OK

docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mar 2021-03-25 13:04:49 CST; 4s ago
Docs: https://docs.docker.com
Main PID: 35283 (dockerd)
Tasks: 9
CGroup: /system.slice/docker.service
└─35283 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.033752207+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" m
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.120893423+08:00" level=warning msg="Your kernel does not support swap memory limit"
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.120928599+08:00" level=warning msg="Your kernel does not support CPU realtime sched
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.121049967+08:00" level=info msg="Loading containers: start."
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.395286964+08:00" level=info msg="Default bridge (docker0) is assigned with an IP ad
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.600646552+08:00" level=info msg="Loading containers: done."
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.640003408+08:00" level=info msg="Docker daemon" commit=8728dd2 graphdriver(s)=overl
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.640101482+08:00" level=info msg="Daemon has completed initialization"
March  25 13:04:49 harbor-https-144 dockerd[35283]: time="2021-03-25T13:04:49.704265015+08:00" level=info msg="API listen on /var/run/docker.sock"
March  25 13:04:49 harbor-https-144 systemd[1]: Started Docker Application Container Engine.

启动docker报错Failed to listen on Docker Socket for the API.的更多相关文章

  1. windows下配置redis集群,启动节点报错:createing server TCP listening socket *:7000:listen:Unknown error

    windows下配置redis集群,启动节点报错:createing server TCP listening socket *:7000:listen:Unknown error 学习了:https ...

  2. docker报错Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    docker报错Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon run ...

  3. 启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法

    我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...

  4. 启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法

    我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...

  5. mac 启动php-fpm报错 failed to open configuration file '/private/etc/php-fpm.conf': No such file or direc

    直接运行,有报错找不到配置文件. $ php-fpm [11-Jan-2014 16:03:03] ERROR: failed to open configuration file '/private ...

  6. docker 报错: Cannot connect to the Docker daemon at unix:///var/run/docker.sock.

    最近在 Windows 子系统 WSL 上面安装了一个 ubuntu18.04, 安装完docker 跑 hello-world 的时候报错了 docker: Cannot connect to th ...

  7. 使用elasticsearch启动项目报错failed to load elasticsearch nodes 。。。。。No type specified for field [name]

    failed to load elasticsearch nodes .....No type specified for field [name]翻译: 加载ElasticSearch节点失败... ...

  8. docker 报错Failed to start Docker Storage Setup. 的处理基本都是容器满了

    :: localhost docker-storage-setup: Volume group extents): required. Apr :: localhost systemd: docker ...

  9. centos7启动网卡报错(Failed to start LSB: Bring up/down networking )

    systemctl status network.service systemctl stop NetworkManager systemctl disable NetworkManager syst ...

随机推荐

  1. Linux 多网卡bonding

    bonding 将多块网卡绑定同一IP地址对外提供服务,可以实现高可用或者负载均衡.直接给两块网卡设置同一IP 地址是不可以的.通过 bonding,虚拟一块网卡对外提供连接,物理网卡的被修改为相同的 ...

  2. Spring 源码(9)Spring Bean的创建过程的前期准备

    回顾总结 到目前为止,Spring源码中AbstractApplicationContext#refresh方法的已经解读到第11个方法finishBeanFactoryInitialization, ...

  3. form表单与CSS选择器和样式操作

    form表单 """获取前端用户数据并发送给后端服务器""" <form action=""></fo ...

  4. 203. Remove Linked List Elements - LeetCode

    Question 203. Remove Linked List Elements Solution 题目大意:从链表中删除给定的数 思路:遍历链表,如果该节点的值等于给的数就删除该节点,注意首节点 ...

  5. 每天一个 HTTP 状态码 103

    103 Early Hints 103 Earyly Hints 是被用于在最终 HTTP 消息前返回一些响应头,常和 HTTP Header: Link 一起使用,让客户端在服务器还在准备(当前的这 ...

  6. Netty是什么,Netty为什么速度这么快,线程模型分析

    哈喽!大家好,我是小奇,一位热爱分享的程序员 小奇打算以轻松幽默的对话方式来分享一些技术,如果你觉得通过小奇的文章学到了东西,那就给小奇一个赞吧 文章持续更新 一.前言 书接上回,现在下着大雨看来是去 ...

  7. Spring Ioc源码分析系列--自动注入循环依赖的处理

    Spring Ioc源码分析系列--自动注入循环依赖的处理 前言 前面的文章Spring Ioc源码分析系列--Bean实例化过程(二)在讲解到Spring创建bean出现循环依赖的时候并没有深入去分 ...

  8. docker引起服务器磁盘爆满

    服务器异常 又是开开心心打开我心爱的服务器一天: 吔!这是嘛啊?我的服务器域名访问不了了,一直转圈圈超时了,好,打开ssh远程看看,吔!!!还是访问不了,宕机了?怀着一颗憋大便的心情打开了阿里云控制面 ...

  9. Git使用 - 忽略特定文件 - gitignore

    1. 背景 2. 创建.gitignore 文件 3. 文件内容样式 4. exclude文件 5. gitignore 文件模板 6. 参考文档 1. 背景 前提知识:在工作目录下的每一个文件都不外 ...

  10. 记录bug的贴子

    这个贴子用来记录一些,平时关注新闻,暴露出来的bug,引以为戒. 2019/01/21 - 拼多多出现大量100元无门槛券 关键词: 风险控制:羊毛党: https://www.zhihu.com/q ...