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

81 views
Skip to first unread message

Mike Titus

unread,
May 21, 2014, 1:25:55 PM5/21/14
to ansible...@googlegroups.com
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

Brian Coca

unread,
May 21, 2014, 6:14:00 PM5/21/14
to ansible...@googlegroups.com
I suspect this might be your issue, you might need to issue the restart as root.

On Wed, May 21, 2014 at 1:25 PM, Mike Titus <mi...@ava.ai> wrote:
sudo_user: phantom




--
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno
Reply all
Reply to author
Forward
0 new messages