# Failed to get D-Bus connection in Docker Container

**URL:** <https://forum.ansible.com/t/failed-to-get-d-bus-connection-in-docker-container/23228>\
**Category:** Ansible Project\
**Created:** [December 11, 2016, 11:20pm UTC](https://forum.ansible.com/t/failed-to-get-d-bus-connection-in-docker-container/23228 "2016-12-11T23:20:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coolman](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@Coolman](https://forum.ansible.com/u/Coolman)\
**Post date:** [December 11, 2016, 11:20pm UTC](https://forum.ansible.com/t/failed-to-get-d-bus-connection-in-docker-container/23228/1 "2016-12-11T23:20:15Z")

</div>

Hello there,  
I get the error described in the title when I execute systemctl in a docker container launcher with Ansible docker module. Thus, I cannot manage services in the docker container (eg. satrt/stop/reload nginx service …etc.)  
How can I avoid this issue when launching a docker container with Andible ?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 12, 2017, 6:52pm UTC](https://forum.ansible.com/t/failed-to-get-d-bus-connection-in-docker-container/23228/2 "2017-01-12T18:52:15Z")

</div>

You have systemd installed in the container but it is not really managing the services (though the container pretends it does). The easy solution is removing systemd from the container to stop confusing the detection.
