During install the following problem occurs:
./awx_install.sh
HEAD is now at 2e98029 Merge pull request #2009 from cdvv7788/Issue/1506
Already up-to-date.
PLAY [Build and deploy AWX] *********************************************************************************************************************************
TASK [check_vars : include_tasks] ***************************************************************************************************************************
skipping: [localhost]
TASK [check_vars : include_tasks] ***************************************************************************************************************************
included: /<install dir>/installer/roles/check_vars/tasks/check_docker.yml for localhost
TASK [check_vars : postgres_data_dir should be defined] *****************************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [check_vars : host_port should be defined] *************************************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [image_build : Get Version from checkout if not provided] **********************************************************************************************
skipping: [localhost]
TASK [image_build : Set global version if not provided] *****************************************************************************************************
skipping: [localhost]
TASK [image_build : Verify awx-logos directory exists for official install] *********************************************************************************
skipping: [localhost]
TASK [image_build : Copy logos for inclusion in sdist] ******************************************************************************************************
skipping: [localhost]
TASK [image_build : Set sdist file name] ********************************************************************************************************************
skipping: [localhost]
TASK [image_build : AWX Distribution] ***********************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stat distribution file] *****************************************************************************************************************
skipping: [localhost]
TASK [image_build : Clean distribution] *********************************************************************************************************************
skipping: [localhost]
TASK [image_build : Build sdist builder image] **************************************************************************************************************
skipping: [localhost]
TASK [image_build : Build AWX distribution using container] *************************************************************************************************
skipping: [localhost]
TASK [image_build : Build AWX distribution locally] *********************************************************************************************************
skipping: [localhost]
TASK [image_build : Set docker build base path] *************************************************************************************************************
skipping: [localhost]
TASK [image_build : Set awx_web image name] *****************************************************************************************************************
skipping: [localhost]
TASK [image_build : Set awx_task image name] ****************************************************************************************************************
skipping: [localhost]
TASK [image_build : Ensure directory exists] ****************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage sdist] ****************************************************************************************************************************
skipping: [localhost]
TASK [image_build : Template web Dockerfile] ****************************************************************************************************************
skipping: [localhost]
TASK [image_build : Template task Dockerfile] ***************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage launch_awx] ***********************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage launch_awx_task] ******************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage nginx.conf] ***********************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage supervisor.conf] ******************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage supervisor_task.conf] *************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage settings.py] **********************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage requirements] *********************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage config watcher] *******************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage Makefile] *************************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage ansible repo] *********************************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage ansible repo key] *****************************************************************************************************************
skipping: [localhost]
TASK [image_build : Build base web image] *******************************************************************************************************************
skipping: [localhost]
TASK [image_build : Build base task image] ******************************************************************************************************************
skipping: [localhost]
TASK [image_build : Tag task and web images as latest] ******************************************************************************************************
skipping: [localhost]
TASK [image_build : Clean docker base directory] ************************************************************************************************************
skipping: [localhost]
TASK [image_push : Authenticate with Docker registry if registry password given] ****************************************************************************
skipping: [localhost]
TASK [image_push : Remove web image] ************************************************************************************************************************
skipping: [localhost]
TASK [image_push : Remove task image] ***********************************************************************************************************************
skipping: [localhost]
TASK [image_push : Tag and push web image to registry] ******************************************************************************************************
skipping: [localhost]
TASK [image_push : Tag and push task image to registry] *****************************************************************************************************
skipping: [localhost]
TASK [image_push : Set full image path for Registry] ********************************************************************************************************
skipping: [localhost]
TASK [kubernetes : fail] ************************************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set kubernetes base path] ****************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : include_tasks] ***************************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : include_tasks] ***************************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Use kubectl or oc] ***********************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Get Postgres Service Detail] *************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Template PostgreSQL Deployment] **********************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Deploy and Activate Postgres] ************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Deploy and Activate Postgres (Kubernetes)] ***********************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set postgresql hostname to helm package service] *****************************************************************************************
skipping: [localhost]
TASK [kubernetes : Wait for Postgres to activate] ***********************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Ensure directory exists] *****************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Template Kubernetes AWX Config] **********************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set task image name] *********************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set web image name] **********************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Template Kubernetes AWX Deployment] ******************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Apply Configmap] *************************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Apply Deployment] ************************************************************************************************************************
skipping: [localhost]
TASK [local_docker : Export Docker web image if it isnt local and there isnt a registry defined] ************************************************************
skipping: [localhost]
TASK [local_docker : Export Docker task image if it isnt local and there isnt a registry defined] ***********************************************************
skipping: [localhost]
TASK [local_docker : Set docker base path] ******************************************************************************************************************
skipping: [localhost]
TASK [local_docker : Ensure directory exists] ***************************************************************************************************************
skipping: [localhost]
TASK [local_docker : Copy web image to docker execution] ****************************************************************************************************
skipping: [localhost]
TASK [local_docker : Copy task image to docker execution] ***************************************************************************************************
skipping: [localhost]
TASK [local_docker : Load web image] ************************************************************************************************************************
skipping: [localhost]
TASK [local_docker : Load task image] ***********************************************************************************************************************
skipping: [localhost]
TASK [local_docker : Set full image path for local install] *************************************************************************************************
skipping: [localhost]
TASK [local_docker : Set DockerHub Image Paths] *************************************************************************************************************
ok: [localhost]
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_f2TUMm/ansible_module_docker_container.py\", line 2081, in <module>\n main()\n File \"/tmp/ansible_f2TUMm/ansible_module_docker_container.py\", line 2076, in main\n cm = ContainerManager(client)\n File \"/tmp/ansible_f2TUMm/ansible_module_docker_container.py\", line 1703, in __init__\n self.present(state)\n File \"/tmp/ansible_f2TUMm/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_f2TUMm/ansible_module_docker_container.py\", line 825, in create_parameters\n host_config=self._host_config(),\n File \"/tmp/ansible_f2TUMm/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 @/<install dir>/installer/install.retry
PLAY RECAP **************************************************************************************************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=1
git reset --hard HEAD
git pull
cd installer
cp /<script config folder>/inventory .
ansible-playbook -i inventory install.yml
Docker containers deployed sucessfully
Container deployment failed
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_f2TUMm/ansible_module_docker_container.py\", line 2081, in <module>\n main()\n File \"/tmp/ansible_f2TUMm/ansible_module_docker_container.py\", line 2076, in main\n cm = ContainerManager(client)\n File \"/tmp/ansible_f2TUMm/ansible_module_docker_container.py\", line 1703, in __init__\n self.present(state)\n File \"/tmp/ansible_f2TUMm/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_f2TUMm/ansible_module_docker_container.py\", line 825, in create_parameters\n host_config=self._host_config(),\n File \"/tmp/ansible_f2TUMm/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 @/<install dir>/installer/install.retry
Ok, not sure if this is related running AWX on an LXD host. I just changed some security nesting settings and now I see another error:
TASK [local_docker : Set DockerHub Image Paths] *************************************************************************************************************
ok: [localhost]
TASK [local_docker : Activate postgres container] ***********************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error connecting: Error while fetching server API version: ('Connection aborted.', error(2, 'No such file or directory'))"}
to retry, use: --limit @/<install dir>/installer/install.retry
PLAY RECAP **************************************************************************************************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=1
Same error here.
I was able to deploy AWX just last week. PoC finished and now I would like to use it in production but same errors.
I don't known what is LXD so I assume I did not use it.
Tested on a fresh Debian 9.4 and Ubuntu 16.04 : still the same issue. Unable to install AWX..
It seems a bit random, now I'm seeing the initial error message again. So probably not related to the LXD security nesting settings:
TASK [local_docker : Activate postgres container] ***********************************************************************************************************
task path: /<install dir>/installer/roles/local_docker/tasks/standalone.yml:2
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_cIZDuz/ansible_module_docker_container.py\", line 2081, in <module>\n main()\n File \"/tmp/ansible_cIZDuz/ansible_module_docker_container.py\", line 2076, in main\n cm = ContainerManager(client)\n File \"/tmp/ansible_cIZDuz/ansible_module_docker_container.py\", line 1703, in __init__\n self.present(state)\n File \"/tmp/ansible_cIZDuz/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_cIZDuz/ansible_module_docker_container.py\", line 825, in create_parameters\n host_config=self._host_config(),\n File \"/tmp/ansible_cIZDuz/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 @/<install dir>/installer/install.retry
PLAY RECAP **************************************************************************************************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=1
I think the install script isn't passing through some variables correctly into Python script ansible_module_docker_container.py.
The process to insert a hostname is going wrong:
when: pg_hostname is not defined or pg_hostname == ''
register: postgres_container_activate
I added pg_hostname = postgres to the inventory and now it moves forward.
But it stops at the next task (rabbitmq) in the sequence:
TASK [local_docker : Activate postgres container] ***********************************************************************************************************
skipping: [localhost]
TASK [local_docker : Activate rabbitmq 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_nNs5IV/ansible_module_docker_container.py\", line 2081, in <module>\n main()\n File \"/tmp/ansible_nNs5IV/ansible_module_docker_container.py\", line 2076, in main\n cm = ContainerManager(client)\n File \"/tmp/ansible_nNs5IV/ansible_module_docker_container.py\", line 1703, in __init__\n self.present(state)\n File \"/tmp/ansible_nNs5IV/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_nNs5IV/ansible_module_docker_container.py\", line 825, in create_parameters\n host_config=self._host_config(),\n File \"/tmp/ansible_nNs5IV/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 @/home/ubuntu/awx/installer/install.retry
PLAY RECAP **************************************************************************************************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=1
Ok for me.
I had to do :
And now everything works.
@coom thanks that worked!
Closing this issue
Oh not solved yet:
TASK [local_docker : Activate AWX Task Container] ******************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error creating container: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)"}
to retry, use: --limit @/<install dir>/installer/install.retry
PLAY RECAP *********************************************************************
localhost : ok=11 changed=4 unreachable=0 failed=1
@itcrowdsource : What version of ansible are you using ? And what version of the python docker module ?
May I ask you to post a :
ansible --version
pip list
ansible 2.6.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
Package Version
---------------------------- ---------
ansible 2.6.0
ansible-tower-cli 3.3.0
Babel 1.3
backports.ssl-match-hostname 3.5.0.1
beautifulsoup4 4.4.1
certifi 2018.4.16
chardet 3.0.4
click 6.7
colorama 0.3.9
cryptography 1.2.3
debtcollector 1.3.0
docker 3.4.1
docker-pycreds 0.3.0
ecdsa 0.13
enum34 1.1.2
funcsigs 0.4
html5lib 0.999
httplib2 0.9.1
idna 2.7
iotop 0.6
ipaddress 1.0.16
iso8601 0.1.11
Jinja2 2.8
keyring 7.3
keystoneauth1 2.4.1
lxml 3.5.0
MarkupSafe 0.23
monotonic 0.6
msgpack-python 0.4.6
ndg-httpsclient 0.4.0
netaddr 0.7.18
netifaces 0.10.4
oslo.i18n 3.5.0
oslo.serialization 2.4.0
oslo.utils 3.8.0
paramiko 1.16.0
pbr 1.8.0
pip 10.0.1
positional 1.0.1
prettytable 0.7.2
pyasn1 0.1.9
pycrypto 2.6.1
pygobject 3.20.0
pyOpenSSL 0.15.1
python-novaclient 3.3.1
pytz 2014.10
PyYAML 3.11
requests 2.19.1
SecretStorage 2.1.3
setuptools 20.7.0
simplejson 3.8.1
six 1.10.0
stevedore 1.12.0
urllib3 1.23
websocket-client 0.44.0
wheel 0.29.0
wrapt 1.8.0
@itcrowdsource: is Docker working well on your system ? Have you tried a :
docker run hello-world
Can you post your awx's inventory file (excluding commented lines) :
cat inventory | grep -v '#'
Also, can you try with larger timeout values by doing :
export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120
before launching the playbook.
Looks like an issue related with docker: #1045, did you try to increase timeout?
@coom @KhaledTo it appeared that docker was down. I reinstalled docker-ce but after changing the python module docker-py into docker, docker-ce stopped working. I had to reinstall docker-ce and now it seems to work properly.
My docker-ce was working fine but same procedure as @itcrowdsource:
Didn't work without docker-ce reinstall.
I was getting the same create_host_config() error as well when following the normal install guide.
But if you just 'pip install docker' and not docker-py it seems to work fine. I guess whatever they need docker-py for is also provided by just docker? I didn't test much though other than it comes up fine and I can login as admin. Not sure what the longer term ramifications are from not having docker-py installed. Can always install it afterwards I suppose.
Anyway, did not have to reinstall docker-ce.
Also as a side note git v1.8.3 worked fine as well. Some people were saying git less than v1.8.4 would choke on a "first-parent" error. Works okay on this OEL7 box.
git-1.8.3.1-14.el7_5.x86_64
Steps:
Fresh OEL7 install (OEL is a RHEL clone)
enable EPEL and docker-ce repos
yum install ansible git python-devel python-pip pwgen
yum install docker-ce
systemctl enable docker
systemctl start docker
pip install -U docker
cd /opt
git clone https://github.com/ansible/awx.git
cd awx/installer
vi inventory
ansible-playbook -i inventory install.yml
profit.
Also reverting back to ansible 2.5.x on the install host seems to work. This allows you to use docker-py again as well. Using ansible 2.5.3-1 to launch the installer runs with no issues (that I can tell).
Since EPEL has already replaced the 2.5.x RPM with 2.6.x you can get the older one here:
I've resolved it with:
(on the remote machine)
pip uninstall docker-py
pip3 uninstall docker-py
pip install docker
pip3 install docker
Is anyone else having issues using the workaround of installing docker instead of docker-py? It works fine until I reboot the host (docker host)...then AWX won't come up. The docker containers start...but I can't access the login page. It just times out. If I keep rebooting over and over it works every once in a while.
I get the same behavior using the older 2.5 version of ansible with docker-py. It installs and works fine...until you have to reboot the host. Then it's unstable city.
@roostercactus What you're describing doesn't sound related to this specific issue. Double-check that you've configured your postgres_data_dirinstallation variable to use a directory that persists on reboot.
If I'm following this thread correctly I _think_ this issue is resolved by making sure your docker-ce, docker-py (or, alternatively docker-compose if you're using that method) are up-to-date. I'm closing this issue for now but please re-open if you're still seeing this.
Most helpful comment
Ok for me.
I had to do :
And now everything works.