当前位置:网站首页>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
边栏推荐
- 面试突击62:group by 有哪些注意事项?
- Kivy tutorial: support Chinese in Kivy to build cross platform applications (tutorial includes source code)
- 李書福為何要親自掛帥造手機?
- Kernel link script parsing
- 一体化实时 HTAP 数据库 StoneDB,如何替换 MySQL 并实现近百倍性能提升
- 在一台服务器上部署多个EasyCVR出现报错“Press any to exit”,如何解决?
- The art of Engineering (1): try to package things that do not need to be exposed
- Getting started with pytest ----- test case pre post, firmware
- [introduction to MySQL] the first sentence · first time in the "database" Mainland
- Growth of operation and maintenance Xiaobai - week 7
猜你喜欢

Solution qui ne peut pas être retournée après la mise à jour du navigateur Web flutter

基于STM32+华为云IOT设计的智能路灯

酷雷曼多种AI数字人形象,打造科技感VR虚拟展厅

Four processes of program operation

How to solve the error "press any to exit" when deploying multiple easycvr on one server?

1700C - Helping the Nature
![[translation] principle analysis of X Window Manager (I)](/img/40/6e15e1acebb47061d6e0e4c8ff82ea.jpg)
[translation] principle analysis of X Window Manager (I)

基本磁盘与动态磁盘 RAID磁盘冗余阵列区分

【Android】Kotlin代码编写规范化文档

开源与安全的“冰与火之歌”
随机推荐
最新财报发布+天猫618双榜第一,耐克蓄力领跑下个50年
Wechat applet obtains mobile number
中移动、蚂蚁、顺丰、兴盛优选技术专家,带你了解架构稳定性保障
The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
10 advanced concepts that must be understood in learning SQL
Scratch epidemic isolation and nucleic acid detection Analog Electronics Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
Spark calculation operator and some small details in liunx
8位MCU跑RTOS有没有意义?
RepPoints:可形变卷积的进阶
Insert dial file of Jerry's watch [chapter]
Kill -9 system call used by PID to kill process
How to submit data through post
高精度运算
Pytorch extract middle layer features?
二分(整数二分、实数二分)
Grafana 9 is officially released, which is easier to use and more cool!
The difference between parallelism and concurrency
Flet教程之 13 ListView最常用的滚动控件 基础入门(教程含源码)
IP, subnet mask, gateway, default gateway
Summary of Android interview questions of Dachang in 2022 (II) (including answers)