Awx: Docker API: Error while fetching server API version

Created on 3 Nov 2017  路  9Comments  路  Source: ansible/awx

ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • Installer
SUMMARY

Can't get AWX running because docker_container module not working.
Without any Python docker modules installed i got:

FAILED! => {"changed": false, "failed": true, "msg": "Failed to import docker-py - No module named docker. Try `pip install docker-py`"}

After install docker-py via pip:

FAILED! => {"changed": false, "failed": true, "msg": "Error connecting: Error while fetching server API version: ('Connection aborted.', error(13, 'Permission denied'))"}
ENVIRONMENT
  • AWX version: latest
  • AWX install method: docker on linux
  • Ansible version: 2.4.0
  • Operating System: CentOS7

Any suggestions?

installer bug

Most helpful comment

That worked... https://docs.docker.com/install/linux/linux-postinstall/
The user should be part of docker group.
$ sudo usermod -aG docker $USER

All 9 comments

Have you added your user account to the docker group? See here: https://docs.docker.com/engine/installation/linux/linux-postinstall/

Playbook is running as root. Or do you mean ansible remote user?

Adding ansible remote user does the trick.. For me, this is not very handy.. The playbook should run this task as root or make sure that the remote user is a member of the docker group. Doing this by hand is annoying..

Behaving as intended

@matburt
What? Doing this step on multiple cluster nodes by hand instead of do some changes at the playbook to fix this behavior? Can't understand closing issues without diskussions..

I think most folks intuitively understand that if you are running a playbook you need to verify that the user you are executing it as has permission to do what you are trying to do. If not then you can pass the appropriate arguments to the ansible-playbook command to do that.

Pull requests are also accepted if you don't like the way it works :)

That worked... https://docs.docker.com/install/linux/linux-postinstall/
The user should be part of docker group.
$ sudo usermod -aG docker $USER

@saavi21 the post install instructions got me unstuck; thanks!

+1 for post install docs. In addition to being in the docker group you need to make sure docker is running, and probably set to start on boot. Those docs cover it.

Was this page helpful?
0 / 5 - 0 ratings