Error: Failed to get D-Bus connection: Operation not permitted
I am having issue running or checking status on any services in Docker in Centos 7. I get: “Failed to get D-Bus connection: Operation not permitted” error when I check or run any service. For example:
systemctl status network.service
Failed to get D-Bus connection: Operation not permitted
Solution
The Centos 7 image doesn’t have a full version of systemd installed. If you have something you want to run as a ‘service’, you can generally accomplish that by starting the daemon directly (for example, with Apache web server, you could run ‘/sbin/apachectl -D FOREGROUND’ which would start the apache daemon for HTTP service).