getting error"Failed to get D-Bus connection: Operation not permitted" while using systemctl command for restarting service in centos container.
Asked
Active
Viewed 1,765 times
1
-
Welcome to SO. Please could you share the code that is causing the error. – Mike Poole Jul 18 '19 at 08:57
-
[root@5178d5af3f09 /]# systemctl restart httpd.service Failed to get D-Bus connection: Operation not permitted [root@5178d5af3f09 /]# systemctl status httpd.service Failed to get D-Bus connection: Operation not permitted – chetan saini Jul 18 '19 at 10:09
1 Answers
0
use below command to start the docker container.
docker run -d -it --privileged ContainerId /usr/sbin/init
use docker file from below link for fix this issue. when run the docker image use --privileged.
https://hub.docker.com/_/centos
add these lines to docker file

Nalin Kularathna
- 306
- 3
- 8
-
[duplicate][1] [1]: https://stackoverflow.com/questions/50393525/failed-to-get-d-bus-connection-operation-not-permitted – Nalin Kularathna Jan 24 '20 at 06:37