当前位置:网站首页>Running the service with systemctl in the container reports an error: failed to get D-Bus connection: operation not permitted (solution)
Running the service with systemctl in the container reports an error: failed to get D-Bus connection: operation not permitted (solution)
2022-07-06 17:59:00 【Dontla】
[[email protected] profile.d]# systemctl start vsftpd.service
Failed to get D-Bus connection: Operation not permitted
[[email protected] profile.d]#
The analysis reason :
Docker The design idea is that there is no background service running in the container , The container itself is an independent master process on the host , It can also be indirectly understood as the application process running the service in the container . The life cycle of a container exists around the main process , So the right way to use the container is to run the service in the foreground .
Again systemd, This suite has become mainstream Linux Distribution version ( such as CentOS7、Ubuntu14+) Default service management , Instead of the traditional SystemV Style service management .systemd Maintenance system service program , It needs privileges to access Linux kernel . And the container is not a complete operating system , There's only one file system , And the default startup is only for ordinary users Linux kernel , That is, no privilege , So of course it doesn't work !
therefore , Follow the container design principles , Running a front desk service in a container !
Reference article :docker Problems arise :Failed to get D-Bus connection: Operation not permitted Solution
resolvent :
need --privileged
And /usr/sbin/init
Parameters are used together
Reference article : How to run the container in privileged mode
边栏推荐
- Distinguish between basic disk and dynamic disk RAID disk redundant array
- 二分(整数二分、实数二分)
- FlutterWeb浏览器刷新后无法回退的解决方案
- 10 advanced concepts that must be understood in learning SQL
- 酷雷曼多种AI数字人形象,打造科技感VR虚拟展厅
- SQL statement optimization, order by desc speed optimization
- Olivetin can safely run shell commands on Web pages (Part 1)
- Grafana 9 is officially released, which is easier to use and more cool!
- MySQL 8 sub database and table backup database shell script
- Interview shock 62: what are the precautions for group by?
猜你喜欢
EasyCVR电子地图中设备播放器loading样式的居中对齐优化
编译原理——预测表C语言实现
偷窃他人漏洞报告变卖成副业,漏洞赏金平台出“内鬼”
scratch疫情隔离和核酸检测模拟 电子学会图形化编程scratch等级考试三级真题和答案解析2022年6月
What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
Pytest learning ----- detailed explanation of the request for interface automation test
李书福为何要亲自挂帅造手机?
F200——搭载基于模型设计的国产开源飞控系统无人机
EasyCVR授权到期页面无法登录,该如何解决?
How to use scroll bars to dynamically adjust parameters in opencv
随机推荐
微信小程序获取手机号
容器里用systemctl运行服务报错:Failed to get D-Bus connection: Operation not permitted(解决方法)
RepPoints:可形变卷积的进阶
OpenCV中如何使用滚动条动态调整参数
Manifest of SAP ui5 framework json
MySQL stored procedure
Insert dial file of Jerry's watch [chapter]
[elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias
高精度运算
EasyCVR电子地图中设备播放器loading样式的居中对齐优化
编译原理——自上而下分析与递归下降分析构造(笔记)
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
Jerry's watch reading setting status [chapter]
[introduction to MySQL] the first sentence · first time in the "database" Mainland
OpenEuler 会长久吗
Debug xv6
二分(整数二分、实数二分)
QT中Model-View-Delegate委托代理机制用法介绍
面试突击62:group by 有哪些注意事项?
RB157-ASEMI整流桥RB157