Hi Matthew, the error is indeed related to the projects directory, as I suspected.
Here are the file permissions on the projects directory as created by the installer playbook.
[root@awx awx]# ll
total 4
drwx------. 19 polkitd root 4096 Aug 13 17:58 pgdata
drwxr-xr-x. 2 root root 6 Aug 13 18:00 projects
Note that I ran the AWX installation playbook as an unprivileged user in the docker user group. Maybe the error has something to do with that. Note that SELinux is enabled. (I noticed that the pgdata directory is owned by polkitd.) I’ve posted my install notes elsewhere in this post. I’m not clear on how Docker works with user groups, file permissions, and SELinux, but I installed as I did mostly because I noticed $ in the install doc and not # for the command that runs the playbook against the inventory file. I didn’t notice any directive to disable SELinux or to add policy rules. Perhaps I was to do such, or to install as root?
I tried polkit.root and peter.peter (the installation user) on the directory, but with the same results. I’m not sure I have time to fuss with this any further, so I’ll leave it here. Thanks all for your attention, and I hope this has been helpful for your project.
Here is the output of awx_web logs, as requested:
2018-08-14 15:47:17,784 INFO awx.api.generics User admin logged in.
192.168.70.51 - - [14/Aug/2018:15:47:20 +0000] “POST /api/login/ HTTP/1.1” 302 0 “http://192.168.10.57/” “Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0” “-”
[pid: 192|app: 0|req: 5/144] 192.168.70.51 () {52 vars in 996 bytes} [Tue Aug 14 15:47:16 2018] POST /api/login/ => generated 0 bytes in 4213 msecs (HTTP/1.1 302) 13 headers in 1844 bytes (1 switches on core 0)
[pid: 201|app: 0|req: 2/145] 192.168.70.51 () {50 vars in 2233 bytes} [Tue Aug 14 15:47:20 2018] GET /api/ => generated 173 bytes in 2769 msecs (HTTP/1.1 200) 11 headers in 471 bytes (1 switches on core 0)
192.168.70.51 - - [14/Aug/2018:15:47:23 +0000] “GET /api/ HTTP/1.1” 200 173 “http://192.168.10.57/” “Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0” “-”
/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/pagination.py:208: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class ‘django.contrib.auth.models.User’> QuerySet.
paginator = self.django_paginator_class(queryset, page_size)
192.168.70.51 - - [14/Aug/2018:15:47:26 +0000] “GET /api/v2/me/ HTTP/1.1” 200 896 “http://192.168.10.57/” “Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0” “-”
[pid: 192|app: 0|req: 6/146] 192.168.70.51 () {46 vars in 2074 bytes} [Tue Aug 14 15:47:23 2018] GET /api/v2/me/ => generated 896 bytes in 3315 msecs (HTTP/1.1 200) 10 headers in 374 bytes (1 switches on core 0)
192.168.70.51 - - [14/Aug/2018:15:47:29 +0000] “GET /websocket/ HTTP/1.1” 101 29 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0” “-”
DAMN ! worker 2 (pid: 192) died, killed by signal 9 trying respawn …
Respawned uWSGI worker 2 (new pid: 253)
2018-08-14 15:47:30,584 ERROR django.request Internal Server Error: /api/v2/config/
Traceback (most recent call last):
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/usr/lib/python2.7/site-packages/awx/wsgi.py”, line 71, in _legacy_get_response
return super(AWXWSGIHandler, self)._legacy_get_response(request)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
return func(*args, **kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/usr/lib/python2.7/site-packages/awx/api/generics.py”, line 328, in dispatch
return super(APIView, self).dispatch(request, *args, **kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 494, in dispatch
response = self.handle_exception(exc)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 454, in handle_exception
self.raise_uncaught_exception(exc)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 491, in dispatch
response = handler(request, *args, **kwargs)
File “/usr/lib/python2.7/site-packages/awx/api/views.py”, line 444, in get
project_local_paths = Project.get_local_path_choices(),
File “/usr/lib/python2.7/site-packages/awx/main/models/projects.py”, line 71, in get_local_path_choices
paths = [x.decode(‘utf-8’) for x in os.listdir(settings.PROJECTS_ROOT)
OSError: [Errno 13] Permission denied: ‘/var/lib/awx/projects’
2018-08-14 15:47:30,584 ERROR django.request Internal Server Error: /api/v2/config/
Traceback (most recent call last):
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/usr/lib/python2.7/site-packages/awx/wsgi.py”, line 71, in _legacy_get_response
return super(AWXWSGIHandler, self)._legacy_get_response(request)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
return func(*args, **kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/usr/lib/python2.7/site-packages/awx/api/generics.py”, line 328, in dispatch
return super(APIView, self).dispatch(request, *args, **kwargs)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 494, in dispatch
response = self.handle_exception(exc)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 454, in handle_exception
self.raise_uncaught_exception(exc)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py”, line 491, in dispatch
response = handler(request, *args, **kwargs)
File “/usr/lib/python2.7/site-packages/awx/api/views.py”, line 444, in get
project_local_paths = Project.get_local_path_choices(),
File “/usr/lib/python2.7/site-packages/awx/main/models/projects.py”, line 71, in get_local_path_choices
paths = [x.decode(‘utf-8’) for x in os.listdir(settings.PROJECTS_ROOT)
OSError: [Errno 13] Permission denied: ‘/var/lib/awx/projects’
[pid: 201|app: 0|req: 3/147] 192.168.70.51 () {46 vars in 2154 bytes} [Tue Aug 14 15:47:26 2018] GET /api/v2/config/ => generated 41 bytes in 4438 msecs (HTTP/1.1 500) 6 headers in 200 bytes (1 switches on core 0)
192.168.70.51 - - [14/Aug/2018:15:47:30 +0000] “GET /api/v2/config/ HTTP/1.1” 500 41 “http://192.168.10.57/” “Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0” “-”