. Advertisement .
..3..
. Advertisement .
..4..
I get an error
Failed to get D-Bus connection: Operation not permitted
when trying to install ambari 2.6 on a docker centos7 image. How to fix the failed to get d-bus connection: operation not permitted error? Please give me some advice.
The cause: I think the cause of this error is that on Centos7, the systemd daemon is used to launch and stop all services. The systemctl command will simply try to communicate with the daemon through a d-bus channel, which is where the message originates.
The solution: To avoid this situation, you need to use this command:
And gain access to the container’s root.
For more information on @Guido’s answer: I copied
systemctl.py
from hier and placed it in the same directory with myDockerfile
and then added the following to myDockerfile
:This allowed me to create a
sshd
service similar to this: