Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

service module: ubuntu xenial on travis: failure 1 running systemctl show for 'apache2': Failed to connect to bus: No such file or directory #4348

Closed
juju4 opened this issue Aug 5, 2016 · 11 comments

Comments

@juju4
Copy link

juju4 commented Aug 5, 2016

ISSUE TYPE
  • Bug Report
COMPONENT NAME

service module

ANSIBLE VERSION
ansible 2.1.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
CONFIGURATION

No extra

OS / ENVIRONMENT

Docker in Travis, mapping ubuntu xenial in local connection

SUMMARY

when using service task to check one is started, task is failed with above message

STEPS TO REPRODUCE

See
https://travis-ci.org/juju4/ansible-icinga2/jobs/150094107
https://travis-ci.org/juju4/ansible-bro-ids/jobs/150093516
https://travis-ci.org/juju4/ansible-mhn/jobs/150159300
(only on target xenial, working on trusty)

On a local Vagrantfile with xenial (as found in github/#role#/test/vagrant): it's working normally...
So there is something with travis environment

EXPECTED RESULTS

test/vagrant local execution on xenial

TASK [bro-ids : check that mysql is running] ***********************************
task path: /home/julien/Documents/script/homelab/roles/bro-ids/tasks/main.yml:80
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -C -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2202 -o 'IdentityFile="/home/julien/Documents/script/homelab/roles/bro-ids/test/vagrant/.vagrant/machines/broids/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/julien/.ansible/cp/ansible-ssh-%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936 `" && echo ansible-tmp-1470432978.69-241202336337936="` echo $HOME/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936 `" ) && sleep 0'"'"''
<127.0.0.1> PUT /tmp/tmp2IUx42 TO /home/vagrant/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936/service
<127.0.0.1> SSH: EXEC sftp -b - -C -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2202 -o 'IdentityFile="/home/julien/Documents/script/homelab/roles/bro-ids/test/vagrant/.vagrant/machines/broids/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/julien/.ansible/cp/ansible-ssh-%h-%p-%r '[127.0.0.1]'
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -C -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2202 -o 'IdentityFile="/home/julien/Documents/script/homelab/roles/bro-ids/test/vagrant/.vagrant/machines/broids/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/julien/.ansible/cp/ansible-ssh-%h-%p-%r -tt 127.0.0.1 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-drceqxkhrlhnomixtamaaklasdzascol; LANG=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936/service; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
ok: [broids] => {"changed": false, "invocation": {"module_args": {"arguments": "", "enabled": null, "name": "mysql", "pattern": null, "runlevel": "default", "sleep": null, "state": "started"}, "module_name": "service"}, "name": "mysql", "state": "started"}
ACTUAL RESULTS

https://travis-ci.org/juju4/ansible-bro-ids/jobs/150166292

TASK [bro-ids : check that mysql is running] ***********************************

task path: /etc/ansible/roles/bro-ids/tasks/main.yml:80

<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root

<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016 `" && echo ansible-tmp-1470433523.11-95534498356016="` echo $HOME/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016 `" ) && sleep 0'

<localhost> PUT /tmp/tmpMC1xcR TO /root/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016/service

<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016/service; rm -rf "/root/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016/" > /dev/null 2>&1 && sleep 0'

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"arguments": "", "enabled": null, "name": "mysql", "pattern": null, "runlevel": "default", "sleep": null, "state": "started"}, "module_name": "service"}, "msg": "failure 1 running systemctl show for 'mysql': Failed to connect to bus: No such file or directory\n"}


@ansibot
Copy link

ansibot commented Aug 5, 2016

@grossws ping, this issue is waiting for your response.
click here for bot help

@juju4
Copy link
Author

juju4 commented Aug 5, 2016

might be related to
#161
influxdata/telegraf#1022

@ansibot
Copy link

ansibot commented Sep 8, 2016

@grossws, ping. This issue is still waiting on your response.
click here for bot help

@geerlingguy
Copy link
Contributor

I seem to have hit this as well, in a Fedora 24 Docker build on Travis CI (note that I can't reproduce the issue using the exact same container and build steps when running them on Docker for Mac 1.12.1...). See: https://travis-ci.org/geerlingguy/ansible-role-redis/jobs/160756445#L298

@ansibot
Copy link

ansibot commented Oct 5, 2016

@ansible, ping. This issue is waiting on your response.
click here for bot help

@ansibot
Copy link

ansibot commented Oct 21, 2016

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@juju4
Copy link
Author

juju4 commented Oct 30, 2016

for reference, running privileged works, but not --cap-add=SYS_ADMIN

    run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"

as seen here moby/moby#7459
seems for cap-add need an unreleased docker.

@ansibot
Copy link

ansibot commented Nov 6, 2016

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@ansibot
Copy link

ansibot commented Nov 22, 2016

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@ansibot
Copy link

ansibot commented Dec 7, 2016

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

@juju4
Copy link
Author

juju4 commented Jan 3, 2017

This issue was moved to ansible/ansible#19818

@juju4 juju4 closed this as completed Jan 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants