After restarting my awx instance, i'm having a stacktrace
Traceback (most recent call last):
File "/usr/bin/awx-manage", line 11, in <module>
load_entry_point('awx==3.0.0.0', 'console_scripts', 'awx-manage')()
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/__init__.py", line 134, in manage
prepare_env()
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/__init__.py", line 89, 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 56, in __getattr__
self._setup(name)
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/settings/production.py", line 85, in <module>
include(settings_file, optional(settings_files), scope=locals())
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/split_settings/tools.py", line 102, in include
exec(compile(to_compile.read(), included_file, 'exec'), scope)
File "/etc/tower/settings.py", line 26, in <module>
SECRET_KEY = file('/etc/tower/SECRET_KEY', 'rb').read().strip()
NameError: name 'file' is not defined
Right after all the process exited
NameError: name 'file' is not defined
2019-01-31 13:43:40,979 INFO exited: channels-worker (exit status 1; not expected)
2019-01-31 13:43:40,979 INFO exited: callback-receiver (exit status 1; not expected)
2019-01-31 13:43:40,980 INFO gave up: channels-worker entered FATAL state, too many start retries too quickly
2019-01-31 13:43:40,980 INFO gave up: callback-receiver entered FATAL state, too many start retries too quickly
2019-01-31 13:43:40,998 INFO exited: dispatcher (exit status 1; not expected)
2019-01-31 13:43:41,999 INFO gave up: dispatcher entered FATAL state, too many start retries too quickly
I start the application
I should get the web UI
i'm getting an internal error
Internal Server Error
I've tried the exact same code in my awx container using python, and successfully retrieve my secret
bash-4.2$ python
Python 2.7.5 (default, Oct 30 2018, 23:45:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import os
import socket
SECRET_KEY = file('/etc/tower/SECRET_KEY', 'rb').read().strip()
print (SECRET_KEY)
MYSECRET
@jmnguye the /etc/tower/settings.py you have is _old_ and needs to be updated to capture this change:
https://github.com/ansible/awx/commit/04da4503dbda6baebd3fc7f74b56586d0cb37918#diff-4fc9fed7c8432c8f554a4eee5e6aab72L8
https://github.com/ansible/awx/blob/589531163ab72b7fe304fe23fbd63994c2247720/installer/roles/image_build/files/settings.py#L6-L9
How are you deploying awx? Are you using the latest image from Dockerhub, or building your own?
i used an upgraded version of my container, it's now ok, thx a lot
Most helpful comment
@jmnguye the
/etc/tower/settings.pyyou have is _old_ and needs to be updated to capture this change:https://github.com/ansible/awx/commit/04da4503dbda6baebd3fc7f74b56586d0cb37918#diff-4fc9fed7c8432c8f554a4eee5e6aab72L8
https://github.com/ansible/awx/blob/589531163ab72b7fe304fe23fbd63994c2247720/installer/roles/image_build/files/settings.py#L6-L9
How are you deploying awx? Are you using the latest image from Dockerhub, or building your own?