【Docker】Failed to get D-Bus connection: Operation not permitted解决
在centos镜像中执行systemctl restart httpd 失败,提示
Failed to get D-Bus connection: Operation not permitted
原因在于
1.没有启动systemd进程
2.没有使用特权
执行下面的命令,即可解决上述1,2的问题
docker run -itd --privileged centos init
执行完成后,再执行失败的命令,即可成功
或者去容器里验证下是否启动成功,是否可以使用systemctl命令
docker exec -it 487acf4373bc /bin/bash
systemctl restart httpd
ps -ef | grep http
root 3542 1 0 08:44 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3543 3542 0 08:44 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3544 3542 0 08:44 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3545 3542 0 08:44 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3546 3542 0 08:44 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3547 3542 0 08:44 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 3549 3449 0 08:44 pts/1 00:00:00 grep --color=auto http
证明成功了
【Docker】Failed to get D-Bus connection: Operation not permitted解决相关推荐
- 登录mysql报错Failed to connect to backoff 或 Failed to get D-Bus connection: Operation not permitted解决方法
报错: Failed to get D-Bus connection: Operation not permitted 或 mysql -u root -p 登录mysql时报错 2020-09-16 ...
- 解决 CentOS7 容器 Failed to get D-Bus connection: Operation not permitted
事由:通过 systemctl start crond 启动任务时报错,具体如下 Failed to get D-Bus connection: Operation not permitted 解决方 ...
- linux docker 报错 Failed to get D-Bus connection: Operation not permitted
使用centos7镜像创建容器后,在里面使用systemctl启动服务报错.针对这个报错,我们接下来就分析下! # docker run -itd --name centos7 centos:7 # ...
- wsl centos7: Failed to get D-Bus connection: Operation not permitted
wsl 运行的 centos 7,使用 service 命令提示 Failed to get D-Bus connection: Operation not permitted 错误,无法运行. 目前 ...
- Dbus启动问题 Failed to get D-Bus connection: Operation not permitted
最近在服务器看到,abrt-action-gen服务一直在跑,且占用较多内存,经查询后发现是abrtd服务出现问题,用systemctl erestart abrtd. systemctl erest ...
- rsync同步时出现rsync: failed to set times on “xxxx”: Operation not permitted
今天在同步数据的时候提示rsync: failed to set times on "xxxx": Operation not permitted,一般来说要不是服务器时间不对或者 ...
- 启动WIFI时:equest firmware failed with error 0xfffffffe ifconfig: SIOCSIFFLAGS: Operation not permitted
一. 问题描述. 嵌入式开发中,启动rtl8188eu无线网卡时弹出如下信息: root@ms:~# ifconfig wlan0 up [ 21.829050] Request firmware f ...
- docker strace ptrace 报错 Operation not permitted 解决方法
docker中gdb在进行进程debug时,会报错: (gdb) attach 30721 Attaching to process 30721 ptrace: Operation not permi ...
- 【node】windows使用 npm i -g报错operation not permitted解决方法
前言 公司电脑被装了安全控制软件后导致npm -g 安装很多东西提示operation not permitted,后来研究了下怎么解决该问题. 解决方式 首先打开不允许操作的路径,比如我这个报错: ...
- Mac提示operation not permitted解决方式
Mac上一些操作需要系统权限,输入正确密码时,一般情况下设置命令就可以解决:sudo chmod -R 777 要修改文件上层目录的路径. 但是部分情况下除外,比如sudo 移动到文件到 /usr/b ...
最新文章
- Mirosoft Office自动化问题
- 深入分析 Java I/O 的工作机制
- 福师《计算机应用基础》期末考试,21年2月福师《计算机应用基础》期末考试A卷答案...
- 二十五、长短时记忆神经网络
- Codeforces Round #626 (Div. 2) D. Present 按位贡献 + 快排新姿势
- 备忘(持续更新。。。)
- labview与单片机正弦信号_LabVIEW小白入门——低通滤波器
- 基于文本和语音的双模态情感分析
- 设计模式——工厂模式(包含:简单工厂模式、工厂方法模式、抽象工厂模式)
- 生成田字格模板(word)
- 转载:为某燃气公司做的一部卡通角色广告动画
- DFS.01-寻路问题
- python学习之编写学员管理系统
- pku 1392 Ouroboros Snake
- Google着手与 Open AI 合作预防人工智能暴走
- FortiGate FGCP HA 配置文档
- 计算机信息系统集成资质涉密信息系统集成资质
- 睡眠多少分钟一个循环_你知道睡眠周期吗?
- 机械革命Code01开启Hyper-V/安装Docker无限蓝屏解决方法
- python输入矩形的长和宽、求周长_输入矩形的长和宽,求出该矩形的周长和面积...