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. 记一次调试YOLOv5+DeepSort车辆跟踪项目的经过

    摘要:学习别人的开源项目是日常的一项必备技能,本文通过一个车辆跟踪(YOLOv5+DeepSort)的例子介绍如何配置和调试GitHub上的开源代码.以第一人称的视角给出本人调试代码的过程,包括项目r ...

  2. 隐藏浏览器header中X-Powered-By: PHP信息

    在php程序中,默认会在http请求响应头中输出php版本信息.如下: HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Date: Tue ...

  3. python二分法、牛顿法求根

    二分法求根 思路:对于一个连续函数,左值f(a)*右值f(b)如果<0,那么在这个区间内[a,b]必存在一个c使得f(c)=0 那么思路便是取中间点,分成两段区间,然后对这两段区间分别再比较,跳 ...

  4. Fail2ban 配置详解 监禁配置(jail.conf)

    ### # 包含配置 ### [INCLUDES] # after = # 在加载本配置文件之后再加载指定的独立配置文件. before = paths-debian.conf # 在加载本配置文件之 ...

  5. 【freertos】009-任务控制

    目录 前言 9.1 相对延时 9.1.1 函数原型 9.1.2 函数说明 9.1.3 参考例子 9.2 绝对延时 9.2.1 函数原型 9.2.2 函数说明 9.2.3 参考例子 9.3 获取任务优先 ...

  6. HTML行内元素与块级元素有哪些及区别详解

    转自 https://www.jb51.net/web/724286.html   这篇文章主要介绍了HTML行内元素与块级元素有哪些及区别详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具 ...

  7. Java_循环结构

    目录 while循环 do...while循环 for循环 for循环嵌套 增强for循环 打印三角形 Debug 视频 while循环 while(布尔表达式){ //循环内容 } //死循环 wh ...

  8. 【Java面试】请说一下Mysql索引的优点和缺点?

    今天分享的这道面试题,让一个工作4年的小伙子去大众点评拿了60W年薪. 这道面试题是: "请你说一下Mysql索引的优点和缺点" 关于这道题,看看普通人和高手的回答 普通人: 嗯. ...

  9. STM32内存知识

    在了解STM32内存之前需要了解 MCU 的型号和MDK 中的.map 文件,很多刚学习 stm32 时都不会过多的去了解 MCU 的选型,是在太枯燥了.这里在从新了解一下,久了就熟悉了. 一.STM ...

  10. 喜提JDK的BUG一枚!多线程的情况下请谨慎使用这个类的stream遍历。

    你好呀,我是歪歪. 前段时间在 RocketMQ 的 ISSUE 里面冲浪的时候,看到一个 pr,虽说是在 RocketMQ 的地盘上发现的,但是这个玩意吧,其实和 RocketMQ 没有任何关系. ...