AWX Installation Failing!

220 views
Skip to first unread message

Ram V

unread,
Jul 13, 2018, 4:46:30 PM7/13/18
to AWX Project
Hi,

I installed docker, docker-py, ansible and cloned AWX. When i try to install AWX, I am getting below error. Any help will be appreciated. Thank you.

TASK [local_docker : Activate postgres container] *******************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: create_host_config() got an unexpected keyword argument 'init'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_HfVjrh/ansible_module_docker_container.py\", line 2081, in <module>\n    main()\n  File \"/tmp/ansible_HfVjrh/ansible_module_docker_container.py\", line 2076, in main\n    cm = ContainerManager(client)\n  File \"/tmp/ansible_HfVjrh/ansible_module_docker_container.py\", line 1703, in __init__\n    self.present(state)\n  File \"/tmp/ansible_HfVjrh/ansible_module_docker_container.py\", line 1723, in present\n    new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)\n  File \"/tmp/ansible_HfVjrh/ansible_module_docker_container.py\", line 825, in create_parameters\n    host_config=self._host_config(),\n  File \"/tmp/ansible_HfVjrh/ansible_module_docker_container.py\", line 931, in _host_config\n    return self.client.create_host_config(**params)\n  File \"/usr/local/lib/python2.7/dist-packages/docker/api/container.py\", line 157, in create_host_config\n    return utils.create_host_config(*args, **kwargs)\nTypeError: create_host_config() got an unexpected keyword argument 'init'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
        to retry, use: --limit @/root/awx/installer/install.retry

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
localhost                  : ok=4    changed=0    unreachable=0    failed=1


Warm Regards,
Ram V
Message has been deleted
Message has been deleted

Garrett Kelly

unread,
Jul 24, 2018, 11:48:47 AM7/24/18
to AWX Project
Hey Ram,

I had just recently encountered the issue as well, and the problem is most likely having the docker-py python library installed instead of the docker python library. (https://github.com/docker/docker-py). This seems to have recently changed since last month as now being an issue.

https://github.com/ansible/awx/issues/2041


Fix is to uninstall docker-py, and install docker instead.

  • pip uninstall docker-py
  • pip install docker

Ram V

unread,
Jul 24, 2018, 12:44:43 PM7/24/18
to Garrett Kelly, AWX Project
Hi Garrett,

Thank you so much for your help and support. I will try your suggestions and keep you posted soon.

Thanks,
Ram 

On Tue, Jul 24, 2018 at 10:45 AM, Garrett Kelly <gkel...@gmail.com> wrote:
Hey Ram,

I had just come across the issue recently as well, and the problem is you most likely have docker-py installed via pip and not docker.

https://github.com/ansible/awx/issues/2041


Fix is to uninstall docker-py, and install docker instead. For reference, this install via pip is to provide a python library for the docker engine API. - https://github.com/docker/docker-py

  • pip uninstall docker-py
  • pip install docker


On Friday, July 13, 2018 at 1:46:30 PM UTC-7, Ram V wrote:

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/4833c953-1334-4625-a04d-a292603e44a3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael McPherson

unread,
Feb 19, 2020, 12:25:10 PM2/19/20
to AWX Project
After trying this many times and failing I found the solution for me was to change the python interpreter in /awx/installer/inventory to this:

#localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python"
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python3"
Reply all
Reply to author
Forward
0 new messages