# service module error: "msg: stop: Unable to connect to system bus"

**URL:** <https://forum.ansible.com/t/service-module-error-msg-stop-unable-to-connect-to-system-bus/15296>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 21, 2014, 5:25pm UTC](https://forum.ansible.com/t/service-module-error-msg-stop-unable-to-connect-to-system-bus/15296 "2014-05-21T17:25:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Titus](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Mike\_Titus](https://forum.ansible.com/u/Mike_Titus)\
**Post date:** [May 21, 2014, 5:25pm UTC](https://forum.ansible.com/t/service-module-error-msg-stop-unable-to-connect-to-system-bus/15296/1 "2014-05-21T17:25:55Z")

</div>

Hi,

This task is failing:

- name: restart phantom queue processes  
service: name=queue enabled=yes state=restarted  
sudo: yes  
sudo\_user: phantom

Ansible v1.5.4 on Ubunutu 12.04 (note that I get the same error when omitting “sudo:” and “sudo\_user:” options)

Error:

\<phantom-dal2.ava.ai\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘IdentityFile=creds/ubuntu\_phantom\_dal2’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘phantom-dal2.ava.ai’, “/bin/sh -c ‘rm -rf /tmp/ansible-tmp-1400692488.26-212551300863070/ \>/dev/null 2\>&1’”]  
failed: [phantom-dal2.ava.ai] =\> {“failed”: true, “item”: “”}  
msg: stop: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system\_bus\_socket: No such file or directory  
start: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system\_bus\_socket: No such file or directory

The upstart script on the host server:

start on runlevel [2345]

stop on runlevel [06]

respawn  
respawn limit 4 2

setuid phantom

script  
cd /mnt/git/phantom

# cd /home/grim/phantom

php queue.php \> /dev/null 2\>&1  
end script

Any suggestions would be greatly appreciated, thanks.

Mike

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [May 21, 2014, 10:14pm UTC](https://forum.ansible.com/t/service-module-error-msg-stop-unable-to-connect-to-system-bus/15296/2 "2014-05-21T22:14:00Z")

</div>

I suspect this might be your issue, you might need to issue the restart as  
root.
