Test Project SCM Type git not working

Hi,

I installed awx 1.0.2.70 and git CE 10.3.3 (https enabled) and can access both via localhost. After setting up a test project in awx (SCM URL https://localhost:50443/rickv/ansible-ae) and running “Start an SCM update” I see the following error messages in STANDARD OUT:

TASK [update project using git] ************************************************ fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: “/usr/bin/git clone --origin origin ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae’ /var/lib/awx/projects/_6__ansible_test_project”, “msg”: “Cloning into ‘/var/lib/awx/projects/_6__ansible_test_project’…\nfatal: unable to access ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/’: Failed to connect to ::1: Cannot assign requested address”, “rc”: 128, “stderr”: “Cloning into ‘/var/lib/awx/projects/_6__ansible_test_project’…\nfatal: unable to access ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/’: Failed to connect to ::1: Cannot assign requested address\n”, “stderr_lines”: [“Cloning into ‘/var/lib/awx/projects/_6__ansible_test_project’…”, “fatal: unable to access ‘https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/’: Failed to connect to ::1: Cannot assign requested address”], “stdout”: “”, “stdout_lines”: } PLAY RECAP ********************************************************************* localhost : ok=0 changed=0 unreachable=0 failed=1

The awx Demo Project SCM update is working fine. Looks like awx can’t access my test project SCM URL but I don’t understand why it can’t?

Thanks,
Rick

Rick,

localhost:50443 … Since the git clone is happening in the AWX docker container; localhost is the container host.

Rick,

Assuming you’ve deployed awx with openshift, the git clone actually runs inside one of the containers, so localhost isn’t going to resolve outside of the container where the git clone is running. If your git server doesn’t have a fully qualified domain name, you’ll need to add a service definition for the external git server so that you can connect to it: https://docs.openshift.com/enterprise/3.1/dev_guide/integrating_external_services.html

https://github.com/ansible/awx/blob/devel/installer/openshift/templates/deployment.yml.j2

Thanks Christopher and Ryan for the helpful explanations/information.
I deployed AWX with standalone Docker daemon (not Openshift). The git server doesn’t have a fully qualified domain name.

Do I need to set awx_container_search_domains in awx/installer/inventory?

Container networking configuration

Set the awx_task and awx_web containers’ search domain(s)

#awx_container_search_domains=example.com,ansible.com

I was able to setup an awx test project/credential/inventory/template and run the template successfully. But I’m sure there is a better/correct way to setup such a test project. What I did:
In awx
Created “Ansible Test Project”:

Created “Ansible Test Credential”:

Created “Ansible Test Inventory” with one host (localhost):

Created “Ansible Test Job Template”:

I configured the git container to use http and in order for awx to access it, I logged into each of the containers awx_web and awx_task and added the git container ip (determined using docker network inspect bridge) to the hosts file.

The hello_world.yml playbook on git:

`