[更新local_settings.py后出现500个错误

问题描述 投票:0回答:1

我是第一次部署Kiwi,遇到了一些问题。标准部署工作正常:我可以运行docker,登录等。

但是,一旦我尝试配置部署,就会遇到很多问题。

如果尝试禁用内部错误跟踪程序,则尝试启动网站中的任何页面时都会收到以下错误:

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")

[尝试删除菜单中的Bug条目引发了完全不同的错误(没有保留日志的副本)。

据我所知,Debug选项从未起作用,但在浏览器中我没有得到详细的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"

这是我的设置问题吗?

谢谢,卡洛斯

deployment kiwi-tcms
1个回答
0
投票
ModuleNotFoundError: No module named 'colorfield'
© www.soinside.com 2019 - 2024. All rights reserved.