解决:dockerd: failed to start daemon: Devices cgroup isn‘t mounted
问题复现
安装docker-19.03.9.tgz
解压并安装后,启动docker
./dockerd & 出现报错提示如下:
failed to start daemon: Devices cgroup isn’t mounted
问题分析
此问题很可能是cgroup没有挂载导致的,因为cgroup没有挂载,所以无法工作。
我们可以直接挂载即可。
问题解决
此处我们直接使用脚本解决,你可以直接复制脚本到你的服务器中,执行即可。
注释:
set -e : 在脚本的前面加上这条命令,表示如果任何语句的执行结果不是true则应该退出。
如果要增加可读性,可以使用set -o errexit,它的作用与set -e相同。
-e 表示文件存在
moutpoint: 判断指定的目录是否是挂载点
set -e
# 这句是告诉bash如何有任何语句执行结果不为ture,就应该退出。 if grep -v '^#' /etc/fstab | grep -q cgroup; thenecho 'cgroups mounted from fstab, not mounting /sys/fs/cgroup'exit 0
fi# kernel provides cgroups?
if [ ! -e /proc/cgroups ]; thenexit 0
fi# 确保目录存在
if [ ! -d /sys/fs/cgroup ]; thenexit 0
fi# mount /sys/fs/cgroup if not already done
if ! mountpoint -q /sys/fs/cgroup; thenmount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
ficd /sys/fs/cgroup# get/mount list of enabled cgroup controllers
for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); domkdir -p $sysif ! mountpoint -q $sys; thenif ! mount -n -t cgroup -o $sys cgroup $sys; thenrmdir $sys || truefifi
doneexit 0
挂载完的效果:
问题总结
这个问题我看到网上也经常会出现,本测试结果真实有效,可以直接复制脚本解决。
解决:dockerd: failed to start daemon: Devices cgroup isn‘t mounted相关推荐
- 重启之后docker不能用了:Docker Error starting daemon: Devices cgroup isn‘t mounted;Got permission denied whil
centos7系统 明明挂载了cgroup,却非要说我没挂载 重启之前好好的,重启之后出了问题,搞了好久才解决 在root用户下运行: umount /sys/fs/cgroup/memory/ mo ...
- ADB server didn't ACK * failed to start daemon * 解决方案
前几天请假了,回到公司后,打开电脑,插上手机,eclipse居然报ADB server didn't ACK * failed to start daemon *的错误,之前出这样的问题,都是: 1. ...
- failed to start daemon at tcp:5037
adb出现daemon启动失败: >adb devices * daemon not running; starting now at tcp:5037 could not read ok fr ...
- 解决gpg failed to sign the data fatal: failed to write commit object解决方案
解决gpg failed to sign the data fatal: failed to write commit object解决方案 参考文章: (1)解决gpg failed to sign ...
- 成功解决Fit Failed Warning: Estimator fit failed. The score on this train-test partition for these param
成功解决Fit Failed Warning: Estimator fit failed. The score on this train-test partition for these param ...
- 成功解决ERROR: Failed building wheel for pycocotools
成功解决ERROR: Failed building wheel for pycocotools 目录 解决问题 解决方法 T1.直接命令法 T2.先编译后下载法 解决问题 ERROR: Failed ...
- Android 解决: Failed to resolve: com.android.support:appcompat-v7:28.+ 错误
今天,简单讲讲Android studio编译报错:Failed to resolve: com.android.support:appcompat-v7:28.+的问题. 这个问题其实之前遇到过,今 ...
- 如何解决Error: failed PB timebomb check
如何解决Error: failed PB timebomb check 编译windowsCE6.0的EBOOT的时候,都最后跳出来一个错误: Error: failed PB timebomb ch ...
- centos 升级 glibc和glibcxxx ,解决error: Failed dependencies等问题
centos 升级 glibc和glibcxxx ,解决error: Failed dependencies等问题 参考文章: (1)centos 升级 glibc和glibcxxx ,解决error ...
最新文章
- strcpy_s与strcpy的比較
- HP880G3 安装RHEL6.5
- [原创] 为什么模除的时候一般建议选择素数来除?比如说hashtable的桶数会取一个素数...
- vc++6.0 同步本机时间到Internet NTP服务器 编译通过
- 使用 Cake 推送 NuGet 包到 AzureDevops 的 Artifacts 上
- Linux系统文件类型 特殊文件 和 进程间通信机制
- 【12c】OCP 062近期新出现的考试原题-第28题
- C#编程(三十三)----------Array类
- android sqlite 打包 xe,Delphi XE使用SQLite3
- 关于「数据分析师」的一些理解
- 【蓝桥杯集训100题】scratch辨别质数合数 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第15题
- Power BI前置知识+ 一张报表制作的流程
- Odoo owl 学习笔记之13—event_handing
- vue + echarts 之饼形图
- bash shell 数组元素遍历操作 foreach
- solr入门之搜索建议的拼音转换工具
- 盛大陈天桥:当场训员工浪费粮食 辩论所向无敌
- cookie写_cookie-parser读操作
- Android telephony整体结构
- Pytest + Selenium + Allure + Jenkins搭建简单自动化框架
热门文章
- Spring框架学习(四):聊一聊xml配置和Java配置
- 刘润:中台的本质是中间件
- Tableau图表 | 16、凹凸图
- ISE14.7用自带XST综合时:ERROR:NgdBuild:604
- FATAL_ERROR:Xst:Portability/export/Port_Main.h:126:1.13.
- 2021年中国内地城市地铁客流量排行榜:北上广深日均客运量超500万人次,深圳客流强度最大(附年榜TOP43详单)
- HCIA基础知识(1)
- Mac os区别_这样做,可以让你的mac电脑更安全
- 【数据分析与挖掘实战】B站影视区数据分析
- Biostrings包测试1_2020-01-29