ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.97k stars 3.41k forks source link

Getting Internal Server Error #4707

Closed ashokdevop closed 5 years ago

ashokdevop commented 5 years ago

Hi Team,

I am trying deploy AWX on kubernetes and deployed all the components successfully but while opening UI getting Internal Server Error

Please help me on this.

Thansk, Ashok

ryanpetrello commented 5 years ago

@capslk we can't help without details. Please refile this issue with all of the details requested at https://github.com/ansible/awx/issues/new?template=bug_report.md

Additionally, please share any errors you see in your container logs - they'll provide hints about what's wrong.

If you need help collecting this data for an AWX install, you might also try our mailing list or IRC room:

http://webchat.freenode.net/?channels=ansible-awx https://groups.google.com/forum/#!forum/awx-project

ashokdevop commented 5 years ago

@ryanpetrello Please find the below awx-web container logs

EXIMR-IM-272:~ ashok.g$ kubectl logs pod/awx-web-75c4459955-f2hrs /usr/bin/launch_awx.sh: line 8: /etc/tower/conf.d/environment.sh: No such file or directory Using /etc/ansible/ansible.cfg as config file 127.0.0.1 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "elapsed": 18, "match_groupdict": {}, "match_groups": [], "path": null, "port": 5432, "search_regex": null, "state": "started" } Using /etc/ansible/ansible.cfg as config file 127.0.0.1 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 11211, "search_regex": null, "state": "started" } Using /etc/ansible/ansible.cfg as config file 127.0.0.1 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 5672, "search_regex": null, "state": "started" } Using /etc/ansible/ansible.cfg as config file 127.0.0.1 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "db": "awx" } Traceback (most recent call last): File "/usr/bin/awx-manage", line 11, in load_entry_point('awx==6.1.0.0', 'console_scripts', 'awx-manage')() File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 126, in manage prepare_env() File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. cut: /etc/tower/conf.d/environment.sh: No such file or directory 2019-09-11 10:38:07,152 INFO RPC interface 'supervisor' initialized 2019-09-11 10:38:07,152 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2019-09-11 10:38:07,152 INFO supervisord started with pid 147 2019-09-11 10:38:08,155 INFO spawned: 'awx-config-watcher' with pid 150 2019-09-11 10:38:08,157 INFO spawned: 'daphne' with pid 151 2019-09-11 10:38:08,159 INFO spawned: 'nginx' with pid 152 2019-09-11 10:38:08,161 INFO spawned: 'uwsgi' with pid 153 Starting uWSGI 2.0.17 (64bit) on [Wed Sep 11 10:38:08 2019] compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-36) on 18 July 2019 18:39:26 os: Linux-4.19.56-1.el7.x86_64 #1 SMP Wed Jun 26 23:17:23 UTC 2019 nodename: awx-web-75c4459955-f2hrs machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 40 current working directory: /var/lib/awx detected binary path: /var/lib/awx/venv/awx/bin/uwsgi your memory page size is 4096 bytes WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uwsgi socket 0 bound to TCP address 127.0.0.1:8050 fd 3 Python version: 3.6.8 (default, Apr 25 2019, 21:02:35) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] Python threads support is disabled. You can enable it with --enable-threads Python main interpreter initialized at 0x19ec240 your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 609552 bytes (595 KB) for 5 cores Operational MODE: preforking uWSGI is running in multiple interpreter mode spawned uWSGI master process (pid: 153) spawned uWSGI worker 1 (pid: 155, cores: 1) spawned uWSGI worker 2 (pid: 156, cores: 1) spawned uWSGI worker 3 (pid: 157, cores: 1) spawned uWSGI worker 4 (pid: 158, cores: 1) spawned uWSGI worker 5 (pid: 159, cores: 1) READY Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/wsgi.py", line 9, in prepare_env() File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. unable to load app 0 (mountpoint='') (callable not found or import error) no app loaded. going in full dynamic mode Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/wsgi.py", line 9, in prepare_env() File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/wsgi.py", line 9, in self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init prepare_env() File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. unable to load app 0 (mountpoint='') (callable not found or import error) no app loaded. going in full dynamic mode if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. unable to load app 0 (mountpoint='') (callable not found or import error) no app loaded. going in full dynamic mode Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/wsgi.py", line 9, in Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/wsgi.py", line 9, in prepare_env() File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env prepare_env() File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. unable to load app 0 (mountpoint='') (callable not found or import error) no app loaded. going in full dynamic mode self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. unable to load app 0 (mountpoint='') (callable not found or import error) no app loaded. going in full dynamic mode Traceback (most recent call last): File "/var/lib/awx/venv/awx/bin/daphne", line 11, in sys.exit(CommandLineInterface.entrypoint()) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 144, in entrypoint cls().run(sys.argv[1:]) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 174, in run channel_layer = importlib.import_module(module_path) File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/asgi.py", line 9, in prepare_env() # NOQA File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. 2019-09-11 10:38:09,140 INFO exited: daphne (exit status 1; not expected) 2019-09-11 10:38:10,142 INFO success: awx-config-watcher entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2019-09-11 10:38:10,145 INFO spawned: 'daphne' with pid 179 2019-09-11 10:38:10,146 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2019-09-11 10:38:10,147 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) Traceback (most recent call last): File "/var/lib/awx/venv/awx/bin/daphne", line 11, in sys.exit(CommandLineInterface.entrypoint()) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 144, in entrypoint cls().run(sys.argv[1:]) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 174, in run channel_layer = importlib.import_module(module_path) File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/asgi.py", line 9, in prepare_env() # NOQA File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. 2019-09-11 10:38:11,102 INFO exited: daphne (exit status 1; not expected) 2019-09-11 10:38:13,107 INFO spawned: 'daphne' with pid 184 Traceback (most recent call last): File "/var/lib/awx/venv/awx/bin/daphne", line 11, in sys.exit(CommandLineInterface.entrypoint()) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 144, in entrypoint cls().run(sys.argv[1:]) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 174, in run channel_layer = importlib.import_module(module_path) File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/asgi.py", line 9, in prepare_env() # NOQA File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. 2019-09-11 10:38:14,073 INFO exited: daphne (exit status 1; not expected) 2019-09-11 10:38:17,079 INFO spawned: 'daphne' with pid 189 Traceback (most recent call last): File "/var/lib/awx/venv/awx/bin/daphne", line 11, in sys.exit(CommandLineInterface.entrypoint()) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 144, in entrypoint cls().run(sys.argv[1:]) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/daphne/cli.py", line 174, in run channel_layer = importlib.import_module(module_path) File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/asgi.py", line 9, in prepare_env() # NOQA File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/init.py", line 91, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. 2019-09-11 10:38:17,991 INFO exited: daphne (exit status 1; not expected) 2019-09-11 10:38:18,993 INFO gave up: daphne entered FATAL state, too many start retries too quickly No previous hash foundRESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY RESULT 2 OKREADY

ryanpetrello commented 5 years ago

@capslk

Is this a new install? An upgrade? How are you deploying it? What version of AWX?

This error should provide you with a hint: django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

You're missing the SECRET_KEY file laid down at install. If you're upgrading, you'll need to persist this value across upgrade.

rnagepalli commented 4 years ago

Hello,

getting internal server error while I browse using http://[ipv6]

Below are the logs: [root@localhost ~]# docker logs -f awx_task Using /etc/ansible/ansible.cfg as config file 127.0.0.1 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 5432, "search_regex": null, "state": "started" } Using /etc/ansible/ansible.cfg as config file 127.0.0.1 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": false, "db": "awx" } Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/settings/production.py", line 85, in include(settings_file, optional(settings_files), scope=locals()) File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/split_settings/tools.py", line 107, in include exec(compiled_code, scope) # noqa: S102, WPS421 File "/etc/tower/settings.py", line 19, in SECRET_KEY = get_secret() File "/etc/tower/settings.py", line 8, in get_secret return open('/etc/tower/SECRET_KEY', 'rb').read().strip() IsADirectoryError: [Errno 21] Is a directory: '/etc/tower/SECRET_KEY'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/awx-manage", line 8, in sys.exit(manage()) File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/init.py", line 136, in manage prepare_env() File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/init.py", line 95, in prepare_env if not settings.DEBUG: # pragma: no cover File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/conf/init.py", line 157, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "/var/lib/awx/venv/awx/lib64/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/settings/production.py", line 107, in raise ImproperlyConfigured(msg) django.core.exceptions.ImproperlyConfigured: No AWX configuration found at /etc/tower/settings.py. Define the AWX_SETTINGS_FILE environment variable to specify an alternate path. Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/settings/production.py", line 85, in include(settings_file, optional(settings_files), scope=locals()) File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/split_settings/tools.py", line 107, in include exec(compiled_code, scope) # noqa: S102, WPS421 File "/etc/tower/settings.py", line 19, in SECRET_KEY = get_secret() File "/etc/tower/settings.py", line 8, in get_secret return open('/etc/tower/SECRET_KEY', 'rb').read().strip() IsADirectoryError: [Errno 21] Is a directory: '/etc/tower/SECRET_KEY'


I have both Python 2.7.5 and 3.6 running - Is this Python issue?


[root@localhost awx]# cat setup.py

!/usr/bin/env python

Copyright (c) 2015 Ansible, Inc.

All Rights Reserved.

import os import glob import sys from setuptools import setup

Paths we'll use later

etcpath = "/etc/tower" homedir = "/var/lib/awx" bindir = "/usr/bin" sharedir = "/usr/share/awx" docdir = "/usr/share/doc/awx"

def get_version(): current_dir = os.path.dirname(os.path.abspath(file)) version_file = os.path.join(current_dir, 'VERSION') with open(version_file, 'r') as file: return file.read().strip()

if os.path.exists("/etc/debian_version"): sysinit = "/etc/init.d" webconfig = "/etc/nginx" siteconfig = "/etc/nginx/sites-enabled"

sosreport-3.1 (and newer) look in '/usr/share/sosreport/sos/plugins'

# sosreport-3.0 looks in '/usr/lib/python2.7/dist-packages/sos/plugins'
# debian/<package>.links will create symlinks to support both versions
sosconfig = "/usr/share/sosreport/sos/plugins"

else: sysinit = "/etc/rc.d/init.d" webconfig = "/etc/nginx" siteconfig = "/etc/nginx/sites-enabled"

The .spec will create symlinks to support multiple versions of sosreport

sosconfig = "/usr/share/sosreport/sos/plugins"

#####################################################################

Helper Functions

def explode_glob_path(path): """Take a glob and hand back the full recursive expansion, ignoring links. """

result = []
includes = glob.glob(path)
for item in includes:
    if os.path.isdir(item) and not os.path.islink(item):
        result.extend(explode_glob_path(os.path.join(item, "*")))
    else:
        result.append(item)
return result

def proc_data_files(data_files): """Because data_files doesn't natively support globs... let's add them. """

result = []

# If running in a virtualenv, don't return data files that would install to
# system paths (mainly useful for running tests via tox).
if hasattr(sys, 'real_prefix'):
    return result

for dir,files in data_files:
    includes = []
    for item in files:
        includes.extend(explode_glob_path(item))
    result.append((dir, includes))
return result

#####################################################################

setup( name=os.getenv('NAME', 'awx'), version=get_version(), author='Ansible, Inc.', author_email='info@ansible.com', description='awx: API, UI and Task Engine for Ansible', long_description='AWX provides a web-based user interface, REST API and ' 'task engine built on top of Ansible', license='Apache License 2.0', keywords='ansible', url='http://github.com/ansible/awx', packages=['awx'], include_package_data=True, zip_safe=False, setup_requires=[], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators' 'License :: Apache License 2.0', 'Natural Language :: English', 'Operating System :: OS Independent', 'Operating System :: POSIX', 'Programming Language :: Python', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Systems Administration', ], entry_points = { 'console_scripts': [ 'awx-manage = awx:manage', ], 'awx.credential_plugins': [ 'conjur = awx.main.credential_plugins.conjur:conjur_plugin', 'hashivault_kv = awx.main.credential_plugins.hashivault:hashivault_kv_plugin', 'hashivault_ssh = awx.main.credential_plugins.hashivault:hashivault_ssh_plugin', 'azure_kv = awx.main.credential_plugins.azure_kv:azure_keyvault_plugin', 'aim = awx.main.credential_plugins.aim:aim_plugin' ] }, data_files = proc_data_files([ ("%s" % homedir, ["config/wsgi.py", "awx/static/favicon.ico"]), ("%s" % siteconfig, ["config/awx-nginx.conf"]),

("%s" % webconfig, ["config/uwsgi_params"]),

    ("%s" % sharedir,       ["tools/scripts/request_tower_configuration.sh","tools/scripts/request_tower_configuration.ps1"]),
    ("%s" % docdir,         ["docs/licenses/*",]),
    ("%s" % bindir, ["tools/scripts/ansible-tower-service",
                     "tools/scripts/failure-event-handler",
                     "tools/scripts/awx-python",
                     "tools/scripts/ansible-tower-setup"]),
    ("%s" % sosconfig, ["tools/sosreport/tower.py"])]),
options = {
    'aliases': {
        'dev_build': 'clean --all egg_info sdist',
        'release_build': 'clean --all egg_info -b "" sdist'
    },
    'build_scripts': {
        'executable': '/usr/bin/awx-python',
    },
},

)

Could someone point me in the right direction?

Thanks