500 error when trying to pull Ansible repo into AWX

I am running AWX on my local machine I have added the git address where my playbooks are stored.

git@github.corp.com:DEVOPS/ansibleplaybooks

I then added my private key to the credential section.

But then when I click ‘run an scm update’

I get the following error:

Failed updating job undefined with variables. POST returned: 500 A server error has occurred.

Then if I go over to job templates, there are no playbooks.

I can git clone git@github.corp.com:DEVOPS/ansibleplaybooks on my local machine using the same private key.

What exactly does the run scm update button do?

If the server returned a 500 error then we need to see the console logs to know what went wrong.

awx_awx_web.1.hwvup1v780ic@moby | [pid: 31|app: 0|req: 55/224] 10.255.0.2 () {46 vars in 2355 bytes} [Thu Nov 30 18:25:38 2017] GET /api/v2/projects/4/update/ => generated 19 bytes in 41 msecs (HTTP/1.1 200) 8 headers in 228 bytes (1 switches on core 0)
awx_awx_web.1.hwvup1v780ic@moby | 2017-11-30 18:25:38,947 ERROR django.request Internal Server Error: /api/v2/projects/4/update/
awx_awx_web.1.hwvup1v780ic@moby | Traceback (most recent call last):
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
awx_awx_web.1.hwvup1v780ic@moby | response = get_response(request)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
awx_awx_web.1.hwvup1v780ic@moby | response = self._get_response(request)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
awx_awx_web.1.hwvup1v780ic@moby | response = self.process_exception_by_middleware(e, request)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
awx_awx_web.1.hwvup1v780ic@moby | response = wrapped_callback(request, *callback_args, **callback_kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
awx_awx_web.1.hwvup1v780ic@moby | return func(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/decorators/csrf.py”, line 58, in wrapped_view
awx_awx_web.1.hwvup1v780ic@moby | return view_func(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
awx_awx_web.1.hwvup1v780ic@moby | return self.dispatch(request, *args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/api/generics.py”, line 248, in dispatch
awx_awx_web.1.hwvup1v780ic@moby | return super(APIView, self).dispatch(request, *args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 489, in dispatch
awx_awx_web.1.hwvup1v780ic@moby | response = self.handle_exception(exc)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 449, in handle_exception
awx_awx_web.1.hwvup1v780ic@moby | self.raise_uncaught_exception(exc)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 486, in dispatch
awx_awx_web.1.hwvup1v780ic@moby | response = handler(request, *args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/api/views.py”, line 1300, in post
awx_awx_web.1.hwvup1v780ic@moby | project_update = obj.update()
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/unified_jobs.py”, line 313, in update
awx_awx_web.1.hwvup1v780ic@moby | unified_job = self.create_unified_job()
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/unified_jobs.py”, line 364, in create_unified_job
awx_awx_web.1.hwvup1v780ic@moby | unified_job.save()
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/unified_jobs.py”, line 728, in save
awx_awx_web.1.hwvup1v780ic@moby | result = super(UnifiedJob, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/polymorphic/models.py”, line 74, in save
awx_awx_web.1.hwvup1v780ic@moby | return super(PolymorphicModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/base.py”, line 193, in save
awx_awx_web.1.hwvup1v780ic@moby | super(PasswordFieldsModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/base.py”, line 264, in save
awx_awx_web.1.hwvup1v780ic@moby | super(PrimordialModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/base.py”, line 159, in save
awx_awx_web.1.hwvup1v780ic@moby | super(CreatedModifiedModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/models/base.py”, line 808, in save
awx_awx_web.1.hwvup1v780ic@moby | force_update=force_update, update_fields=update_fields)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/models/base.py”, line 848, in save_base
awx_awx_web.1.hwvup1v780ic@moby | update_fields=update_fields, raw=raw, using=using,
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/dispatch/dispatcher.py”, line 193, in send
awx_awx_web.1.hwvup1v780ic@moby | for receiver in self._live_receivers(sender)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/ha.py”, line 142, in on_job_create
awx_awx_web.1.hwvup1v780ic@moby | instance=Instance.objects.me(),
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/managers.py”, line 86, in me
awx_awx_web.1.hwvup1v780ic@moby | raise RuntimeError(“No instance found with the current cluster host id”)
awx_awx_web.1.hwvup1v780ic@moby | RuntimeError: No instance found with the current cluster host id
awx_awx_web.1.hwvup1v780ic@moby | 2017-11-30 18:25:38,947 ERROR django.request Internal Server Error: /api/v2/projects/4/update/
awx_awx_web.1.hwvup1v780ic@moby | Traceback (most recent call last):
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
awx_awx_web.1.hwvup1v780ic@moby | response = get_response(request)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
awx_awx_web.1.hwvup1v780ic@moby | response = self._get_response(request)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
awx_awx_web.1.hwvup1v780ic@moby | response = self.process_exception_by_middleware(e, request)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
awx_awx_web.1.hwvup1v780ic@moby | response = wrapped_callback(request, *callback_args, **callback_kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
awx_awx_web.1.hwvup1v780ic@moby | return func(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/decorators/csrf.py”, line 58, in wrapped_view
awx_awx_web.1.hwvup1v780ic@moby | return view_func(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
awx_awx_web.1.hwvup1v780ic@moby | return self.dispatch(request, *args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/api/generics.py”, line 248, in dispatch
awx_awx_web.1.hwvup1v780ic@moby | return super(APIView, self).dispatch(request, *args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 489, in dispatch
awx_awx_web.1.hwvup1v780ic@moby | response = self.handle_exception(exc)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 449, in handle_exception
awx_awx_web.1.hwvup1v780ic@moby | self.raise_uncaught_exception(exc)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 486, in dispatch
awx_awx_web.1.hwvup1v780ic@moby | response = handler(request, *args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/api/views.py”, line 1300, in post
awx_awx_web.1.hwvup1v780ic@moby | project_update = obj.update()
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/unified_jobs.py”, line 313, in update
awx_awx_web.1.hwvup1v780ic@moby | unified_job = self.create_unified_job()
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/unified_jobs.py”, line 364, in create_unified_job
awx_awx_web.1.hwvup1v780ic@moby | unified_job.save()
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/unified_jobs.py”, line 728, in save
awx_awx_web.1.hwvup1v780ic@moby | result = super(UnifiedJob, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/polymorphic/models.py”, line 74, in save
awx_awx_web.1.hwvup1v780ic@moby | return super(PolymorphicModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/base.py”, line 193, in save
awx_awx_web.1.hwvup1v780ic@moby | super(PasswordFieldsModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/base.py”, line 264, in save
awx_awx_web.1.hwvup1v780ic@moby | super(PrimordialModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/base.py”, line 159, in save
awx_awx_web.1.hwvup1v780ic@moby | super(CreatedModifiedModel, self).save(*args, **kwargs)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/models/base.py”, line 808, in save
awx_awx_web.1.hwvup1v780ic@moby | force_update=force_update, update_fields=update_fields)
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/models/base.py”, line 848, in save_base
awx_awx_web.1.hwvup1v780ic@moby | update_fields=update_fields, raw=raw, using=using,
awx_awx_web.1.hwvup1v780ic@moby | File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/dispatch/dispatcher.py”, line 193, in send
awx_awx_web.1.hwvup1v780ic@moby | for receiver in self._live_receivers(sender)
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/models/ha.py”, line 142, in on_job_create
awx_awx_web.1.hwvup1v780ic@moby | instance=Instance.objects.me(),
awx_awx_web.1.hwvup1v780ic@moby | File “/usr/lib/python2.7/site-packages/awx/main/managers.py”, line 86, in me
awx_awx_web.1.hwvup1v780ic@moby | raise RuntimeError(“No instance found with the current cluster host id”)
awx_awx_web.1.hwvup1v780ic@moby | RuntimeError: No instance found with the current cluster host id
awx_awx_web.1.hwvup1v780ic@moby | 10.255.0.2 - - [30/Nov/2017:18:25:38 +0000] “POST /api/v2/projects/4/update/ HTTP/1.1” 500 41 “http://localhost/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36” “-”
awx_awx_web.1.hwvup1v780ic@moby | [pid: 33|app: 0|req: 36/225] 10.255.0.2 () {52 vars in 2495 bytes} [Thu Nov 30 18:25:38 2017] POST /api/v2/projects/4/update/ => generated 41 bytes in 77 msecs (HTTP/1.1 500) 5 headers in 177 bytes (1 switches on core 0)

Not sure if related, but after seeing this issue https://github.com/ansible/awx/issues/86
it’s worth mentioning that my instance of AWX was deployed using this swarm template:
https://github.com/kiranos/playground/tree/master/awx/swarm

It’s hard to know if you didn’t use our installer, I’d check with that repository maintainer to see if he can help you out.