500 ошибок после обновления local_settings.py - PullRequest
0 голосов
/ 06 февраля 2020

Я впервые использую Kiwi и сталкиваюсь с некоторыми проблемами. Стандартное развертывание работает нормально: я могу запустить docker, войти в систему и т. Д. c.

После того, как я попытался настроить развертывание, я столкнулся с множеством проблем.

Если я пытаюсь отключить Internal Bug Tracker, я получаю следующую ошибку при попытке запустить любую страницу на сайте:

web_1  | [Thu Feb 06 16:23:32.612335 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787] mod_wsgi (pid=11): Failed to exec Python script file '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:23:32.612409 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787] mod_wsgi (pid=11): Exception occurred processing WSGI script '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:23:32.613673 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787] Traceback (most recent call last):
web_1  | [Thu Feb 06 16:23:32.613895 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "/venv/lib64/python3.6/site-packages/tcms/wsgi.py", line 40, in <module>
web_1  | [Thu Feb 06 16:23:32.613913 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]     _APPLICATION = get_wsgi_application()
web_1  | [Thu Feb 06 16:23:32.613922 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "/venv/lib64/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
web_1  | [Thu Feb 06 16:23:32.613925 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]     django.setup(set_prefix=False)
web_1  | [Thu Feb 06 16:23:32.613930 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "/venv/lib64/python3.6/site-packages/django/__init__.py", line 24, in setup
web_1  | [Thu Feb 06 16:23:32.613933 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]     apps.populate(settings.INSTALLED_APPS)
web_1  | [Thu Feb 06 16:23:32.613938 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "/venv/lib64/python3.6/site-packages/django/apps/registry.py", line 91, in populate
web_1  | [Thu Feb 06 16:23:32.613941 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]     app_config = AppConfig.create(entry)
web_1  | [Thu Feb 06 16:23:32.613945 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "/venv/lib64/python3.6/site-packages/django/apps/config.py", line 90, in create
web_1  | [Thu Feb 06 16:23:32.614502 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]     module = import_module(entry)
web_1  | [Thu Feb 06 16:23:32.614532 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
web_1  | [Thu Feb 06 16:23:32.614537 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]     return _bootstrap._gcd_import(name[level:], package, level)
web_1  | [Thu Feb 06 16:23:32.614543 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
web_1  | [Thu Feb 06 16:23:32.614548 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
web_1  | [Thu Feb 06 16:23:32.614818 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787]   File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
web_1  | [Thu Feb 06 16:23:32.614843 2020] [wsgi:error] [pid 11:tid 140443152291584] [remote 192.168.105.200:52787] ModuleNotFoundError: No module named 'colorfield'
web_1  | 192.168.105.200 - - [06/Feb/2020:16:23:31 +0000] "GET / HTTP/1.1" 500 527 "https://192.168.105.25/accounts/login/?next=/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0"
web_1  | [Thu Feb 06 16:24:00.126930 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792] mod_wsgi (pid=11): Failed to exec Python script file '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:24:00.127061 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792] mod_wsgi (pid=11): Exception occurred processing WSGI script '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:24:00.127397 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792] Traceback (most recent call last):
web_1  | [Thu Feb 06 16:24:00.127491 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]   File "/venv/lib64/python3.6/site-packages/tcms/wsgi.py", line 40, in <module>
web_1  | [Thu Feb 06 16:24:00.127501 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]     _APPLICATION = get_wsgi_application()
web_1  | [Thu Feb 06 16:24:00.127514 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]   File "/venv/lib64/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
web_1  | [Thu Feb 06 16:24:00.127519 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]     django.setup(set_prefix=False)
web_1  | [Thu Feb 06 16:24:00.127529 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]   File "/venv/lib64/python3.6/site-packages/django/__init__.py", line 24, in setup
web_1  | [Thu Feb 06 16:24:00.127534 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]     apps.populate(settings.INSTALLED_APPS)
web_1  | [Thu Feb 06 16:24:00.127543 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]   File "/venv/lib64/python3.6/site-packages/django/apps/registry.py", line 83, in populate
web_1  | [Thu Feb 06 16:24:00.127548 2020] [wsgi:error] [pid 11:tid 140443034793728] [remote 192.168.105.200:52792]     raise RuntimeError("populate() isn't reentrant")

Попытка удалить записи об ошибках в меню вызвала совершенно другое ошибка (не сохранила копию журнала).

Насколько я могу судить, опция Отладка никогда не работала, я не получаю подробные 500 ошибок в браузере.

Я немного отчаялся и вставил весь общий файл в local_settings.py, чтобы посмотреть, было ли что-то не так, и получил следующую ошибку:

web_1  | [Thu Feb 06 16:44:45.990672 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696] mod_wsgi (pid=10): Failed to exec Python script file '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:44:45.990740 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696] mod_wsgi (pid=10): Exception occurred processing WSGI script '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:44:45.991753 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696] Traceback (most recent call last):
web_1  | [Thu Feb 06 16:44:45.991853 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/tcms/wsgi.py", line 40, in <module>
web_1  | [Thu Feb 06 16:44:45.991863 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     _APPLICATION = get_wsgi_application()
web_1  | [Thu Feb 06 16:44:45.991872 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
web_1  | [Thu Feb 06 16:44:45.991877 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     django.setup(set_prefix=False)
web_1  | [Thu Feb 06 16:44:45.991883 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/django/__init__.py", line 19, in setup
web_1  | [Thu Feb 06 16:44:45.991904 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
web_1  | [Thu Feb 06 16:44:45.991917 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 76, in __getattr__
web_1  | [Thu Feb 06 16:44:45.991933 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     self._setup(name)
web_1  | [Thu Feb 06 16:44:45.991942 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 63, in _setup
web_1  | [Thu Feb 06 16:44:45.991946 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     self._wrapped = Settings(settings_module)
web_1  | [Thu Feb 06 16:44:45.991952 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 142, in __init__
web_1  | [Thu Feb 06 16:44:45.991954 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     mod = importlib.import_module(self.SETTINGS_MODULE)
web_1  | [Thu Feb 06 16:44:45.991959 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
web_1  | [Thu Feb 06 16:44:45.991964 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     return _bootstrap._gcd_import(name[level:], package, level)
web_1  | [Thu Feb 06 16:44:45.991969 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
web_1  | [Thu Feb 06 16:44:45.991977 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
web_1  | [Thu Feb 06 16:44:45.991982 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
web_1  | [Thu Feb 06 16:44:45.991990 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
web_1  | [Thu Feb 06 16:44:45.992008 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
web_1  | [Thu Feb 06 16:44:45.992015 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1  | [Thu Feb 06 16:44:45.992037 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/tcms/settings/product.py", line 13, in <module>
web_1  | [Thu Feb 06 16:44:45.992041 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     from .local_settings import *  # noqa: F401,F403
web_1  | [Thu Feb 06 16:44:45.992047 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]   File "/venv/lib64/python3.6/site-packages/tcms/settings/local_settings.py", line 35, in <module>
web_1  | [Thu Feb 06 16:44:45.992051 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696]     for plugin in pkg_resources.iter_entry_points('kiwitcms.plugins'):
web_1  | [Thu Feb 06 16:44:45.992070 2020] [wsgi:error] [pid 10:tid 139924213229312] [remote 192.168.105.200:53696] NameError: name 'pkg_resources' is not defined
web_1  | 192.168.105.200 - - [06/Feb/2020:16:44:45 +0000] "GET / HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0"
web_1  | [Thu Feb 06 16:44:59.226706 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698] mod_wsgi (pid=10): Failed to exec Python script file '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:44:59.226766 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698] mod_wsgi (pid=10): Exception occurred processing WSGI script '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Thu Feb 06 16:44:59.226974 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698] Traceback (most recent call last):
web_1  | [Thu Feb 06 16:44:59.227041 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/tcms/wsgi.py", line 40, in <module>
web_1  | [Thu Feb 06 16:44:59.227047 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     _APPLICATION = get_wsgi_application()
web_1  | [Thu Feb 06 16:44:59.227053 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
web_1  | [Thu Feb 06 16:44:59.227056 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     django.setup(set_prefix=False)
web_1  | [Thu Feb 06 16:44:59.227061 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/django/__init__.py", line 19, in setup
web_1  | [Thu Feb 06 16:44:59.227064 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
web_1  | [Thu Feb 06 16:44:59.227069 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 76, in __getattr__
web_1  | [Thu Feb 06 16:44:59.227072 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     self._setup(name)
web_1  | [Thu Feb 06 16:44:59.227077 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 63, in _setup
web_1  | [Thu Feb 06 16:44:59.227079 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     self._wrapped = Settings(settings_module)
web_1  | [Thu Feb 06 16:44:59.227084 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 142, in __init__
web_1  | [Thu Feb 06 16:44:59.227087 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     mod = importlib.import_module(self.SETTINGS_MODULE)
web_1  | [Thu Feb 06 16:44:59.227092 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
web_1  | [Thu Feb 06 16:44:59.227094 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     return _bootstrap._gcd_import(name[level:], package, level)
web_1  | [Thu Feb 06 16:44:59.227099 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
web_1  | [Thu Feb 06 16:44:59.227104 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
web_1  | [Thu Feb 06 16:44:59.227109 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
web_1  | [Thu Feb 06 16:44:59.227114 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
web_1  | [Thu Feb 06 16:44:59.227119 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
web_1  | [Thu Feb 06 16:44:59.227124 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1  | [Thu Feb 06 16:44:59.227133 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/tcms/settings/product.py", line 13, in <module>
web_1  | [Thu Feb 06 16:44:59.227136 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     from .local_settings import *  # noqa: F401,F403
web_1  | [Thu Feb 06 16:44:59.227142 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]   File "/venv/lib64/python3.6/site-packages/tcms/settings/local_settings.py", line 35, in <module>
web_1  | [Thu Feb 06 16:44:59.227144 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698]     for plugin in pkg_resources.iter_entry_points('kiwitcms.plugins'):
web_1  | [Thu Feb 06 16:44:59.227159 2020] [wsgi:error] [pid 10:tid 139924204836608] [remote 192.168.105.200:53698] NameError: name 'pkg_resources' is not defined
web_1  | 192.168.105.200 - - [06/Feb/2020:16:44:59 +0000] "GET / HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0"

Это проблема с моими настройками?

Спасибо, Карлос

1 Ответ

0 голосов
/ 07 февраля 2020
ModuleNotFoundError: No module named 'colorfield'

colorfield - это новая зависимость, которая была добавлена ​​пару дней назад go. Это означает, что вы используете последнюю ветку master, а не выпущенную версию Kiwi TCMS. Это также означает, что эта конкретная зависимость не установлена ​​в вашем docker образе, вероятно.

Без дополнительной информации о том, какой docker образ вы используете и как именно вы его запускаете и что именно в вашем local_settings.py Мы мало чем можем помочь.

...