石墨.wsgi'无法作为Python模块加载

时间:2019-04-15 15:37:13

标签: django apache ubuntu-18.04 graphite

我在Ubuntu 18.04上安装了石墨,但遇到以下问题:

我做到了: -权限:

chown -R www-data:www-data /usr/share/graphite-web/
chmod +x  /usr/share/graphite-web/graphite.wsgi
  • 将石墨.wsgi替换为:
import sys
# In case of multi-instance graphite, uncomment and set appropriate name
# import os
# os.environ['GRAPHITE_SETTINGS_MODULE'] = 'graphite.local_settings'
sys.path.append('/opt/graphite/webapp')

from graphite.wsgi import application    

Bu仍然是同一问题:

[Sun Apr 14 23:14:18.673665 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264] mod_wsgi (pid=4639): Target WSGI script '/usr/share/graphite-web/graphite.wsgi' cannot be loaded as Python module.
[Sun Apr 14 23:14:18.673693 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264] mod_wsgi (pid=4639): Exception occurred processing WSGI script '/usr/share/graphite-web/graphite.wsgi'.
[Sun Apr 14 23:14:18.673707 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264] Traceback (most recent call last):
[Sun Apr 14 23:14:18.673722 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]   File "/usr/share/graphite-web/graphite.wsgi", line 14, in <module>
[Sun Apr 14 23:14:18.673755 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]     application = get_wsgi_application()
[Sun Apr 14 23:14:18.673773 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]   File "/usr/lib/python2.7/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Sun Apr 14 23:14:18.673786 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]     django.setup(set_prefix=False)
[Sun Apr 14 23:14:18.673792 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]   File "/usr/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
[Sun Apr 14 23:14:18.673808 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]     apps.populate(settings.INSTALLED_APPS)
[Sun Apr 14 23:14:18.673815 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]   File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 78, in populate
[Sun Apr 14 23:14:18.673826 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264]     raise RuntimeError("populate() isn't reentrant")
[Sun Apr 14 23:14:18.673838 2019] [wsgi:error] [pid 4639] [remote 127.0.0.1:47264] RuntimeError: populate() isn't reentrant

0 个答案:

没有答案