Solving error ansible/awx#3956
SOLVED BY MY SIDE. Hey guys, let me share something with you. some important points to investigate on your side:
- Do you have enough space on your system to awx download the images?
- Have you checked if you don't have any "trash" from previous installations?
- Have you checked if you have nginx, postgress local running? (stop all to avoid conflict)
- Have you checked all requirements related to memory, disk, and configuration file?
If you have some avahi process running from tower(before installation):
ps aux | grep avahi | awk '{print $2}'| xargs kill -9To kill all containers and then delete all images:
docker stop $(docker ps -q) ; docker rm $(docker ps -a)
docker rmi $(docker images) When you will run the playbook, use the verbose mode to have more details about the error -vvv
The full traceback is:
File "/tmp/ansible_docker_compose_payload_owsfbjvw/ansible_docker_compose_payload.zip/ansible/modules/cloud/docker/docker_compose.py", line 791, in cmd_up
File "/usr/local/lib/python3.6/site-packages/compose/project.py", line 507, in up
'Encountered errors while bringing up the project.'
fatal: [localhost]: FAILED! => {
"changed": false,
"errors": [],
"invocation": {
"module_args": {
"api_version": "auto",
"build": false,
"ca_cert": null,
"client_cert": null,
"client_key": null,
"debug": false,
"definition": null,
"dependencies": true,
"docker_host": "unix://var/run/docker.sock",
"files": null,
"hostname_check": false,
"nocache": false,
"project_name": null,
"project_src": "/root/.awx/awxcompose",
"pull": false,
"recreate": "smart",
"remove_images": null,
"remove_orphans": false,
"remove_volumes": false,
"restarted": false,
"scale": null,
"services": null,
"ssl_version": null,
"state": "present",
"stopped": true,
"timeout": 10,
"tls": false,
"tls_hostname": "localhost",
"validate_certs": false
}
},
"module_stderr": "Starting awx_web ... \n\u001b[1A\u001b[2K\nStarting awx_web ... \n\u001b[1B",
"module_stdout": "",
"msg": "Error starting project Encountered errors while bringing up the project."
}fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": "docker-compose run --rm --service-ports task awx-manage migrate --no-input",
"delta": "0:00:53.342387",
"end": "2021-12-11 19:02:31.300163",
"invocation": {
"module_args": {
"_raw_params": "docker-compose run --rm --service-ports task awx-manage migrate --no-input",
"_uses_shell": true,
"argv": null,
"chdir": "/root/.awx/awxcompose",
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2021-12-11 19:01:37.957776",
"stderr": "Creating network \"awxcompose_default\" with the default driver\nPulling postgres (postgres:12)...\nPulling web (ansible/awx:17.1.0)...\nfailed to register layer: Error processing tar file(exit status 1): open /var/lib/awx/venv/awx/lib/python3.6/site-packages/aiohttp/__pycache__/web_response.cpython-36.pyc: no space left on device",
"stderr_lines": [
"Creating network \"awxcompose_default\" with the default driver",
"Pulling postgres (postgres:12)...",
"Pulling web (ansible/awx:17.1.0)...",
"failed to register layer: Error processing tar file(exit status 1): open /var/lib/awx/venv/awx/lib/python3.6/site-packages/aiohttp/__pycache__/web_response.cpython-36.pyc: no space left on device"
],
"stdout": "12: Pulling from library/postgres\n17.1.0: Pulling from ansible/awx",
"stdout_lines": [
"12: Pulling from library/postgres",
"17.1.0: Pulling from ansible/awx"
]
}
After cleaning all and allowing more resources on my lab machine disk.
$ ansible-playbook -i installer/inventory installer/install.yml -vvvv
ok: [localhost] => {
"changed": false,
"cmd": [
"docker",
"exec",
"awx_task",
"bash",
"-c",
"/usr/bin/awx-manage create_preload_data"
],
"delta": "0:00:12.361345",
"end": "2021-12-11 19:09:19.735999",
"invocation": {
"module_args": {
"_raw_params": "docker exec awx_task bash -c \"/usr/bin/awx-manage create_preload_data\"",
"_uses_shell": false,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"rc": 0,
"start": "2021-12-11 19:09:07.374654",
"stderr": "",
"stderr_lines": [],
"stdout": "An organization is already in the system, exiting.\n(changed: False)",
"stdout_lines": [
"An organization is already in the system, exiting.",
"(changed: False)"
]
}
META: ran handlers
META: ran handlers
PLAY RECAP *****************************************************************************************************
localhost : ok=21 changed=7 unreachable=0 failed=0 skipped=73 rescued=0 ignored=1 docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e09076cc2e5e ansible/awx:17.1.0 "/usr/bin/tini -- /u…" 14 minutes ago Up 13 minutes 8052/tcp awx_task
c0534310a775 ansible/awx:17.1.0 "/usr/bin/tini -- /b…" 14 minutes ago Up 13 minutes 0.0.0.0:80->8052/tcp, :::80->8052/tcp awx_web
e2ecd09dbcc1 redis "docker-entrypoint.s…" 14 minutes ago Up 13 minutes 6379/tcp awx_redis
027c7bf28756 postgres:12 "docker-entrypoint.s…" 14 minutes ago Up 13 minutes 5432/tcp awx_postgres
curl 192.168.99.110 -LI
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 11 Dec 2021 22:26:09 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 1082
Connection: keep-alive
Vary: Accept-Language, Origin, Cookie
Content-Language: en
X-API-Total-Time: 0.019s
Strict-Transport-Security: max-age=15768000
X-Frame-Options: DENY