django 1.9.6
및 mod_wsgi
을 사용하는 가상 컴퓨터에 내 응용 프로그램을 설치하는 데 사용하는 스크립트가 있습니다. 적어도 1 년 동안은 잘 작동하고 몇 달 후에는 사용하지 않았습니다. 갑자기 작동하지 않습니다. 나는 항상 우분투 깨끗한 이미지에 설치하고 나는 어떤 변화도 만들지 않았다. 내 생각에 apt-get
은 libapache2-mod-wsgi
의 다른 버전을 설치하고 있습니다.Django 및 mod_wsgi 설치가 갑자기 중단되었습니다.
sudo apt-get update
sudo apt-get install -y python-pip
sudo pip install django=1.9.6
sudo pip install python-social-auth
sudo apt-get -y install apache2 libapache2-mod-wsgi
...
나는 아파치 서버가 오류를 제공하는 응용 프로그램을 실행하려고하면 :
[Tue Oct 17 11:52:29.184072 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] mod_wsgi (pid=8178): Target WSGI script '/root/geosearch_app/geosearch_project/geosearch_project/wsgi.py' cannot be loaded as Python module.
[Tue Oct 17 11:52:29.184116 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] mod_wsgi (pid=8178): Exception occurred processing WSGI script '/root/geosearch_app/geosearch_project/geosearch_project/wsgi.py'.
[Tue Oct 17 11:52:29.184140 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] Traceback (most recent call last):
[Tue Oct 17 11:52:29.184159 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] File "/root/geosearch_app/geosearch_project/geosearch_project/wsgi.py", line 16, in <module>
[Tue Oct 17 11:52:29.184212 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] application = get_wsgi_application()
[Tue Oct 17 11:52:29.184225 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Tue Oct 17 11:52:29.184266 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] django.setup()
[Tue Oct 17 11:52:29.184280 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup
[Tue Oct 17 11:52:29.184327 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] apps.populate(settings.INSTALLED_APPS)
[Tue Oct 17 11:52:29.184339 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
[Tue Oct 17 11:52:29.184458 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] app_config.import_models(all_models)
[Tue Oct 17 11:52:29.184471 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models
[Tue Oct 17 11:52:29.184549 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] self.models_module = import_module(models_module_name)
[Tue Oct 17 11:52:29.184561 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Tue Oct 17 11:52:29.184738 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] __import__(name)
[Tue Oct 17 11:52:29.184751 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/default/models.py", line 1, in <module>
[Tue Oct 17 11:52:29.184791 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] from social_django.models import AbstractUserSocialAuth, UserSocialAuth, Nonce, Association, Code, DjangoStorage
[Tue Oct 17 11:52:29.184819 2017] [:error] [pid 8178:tid 140000402241280] [remote 131.111.64.116:33385] ImportError: No module named social_django.models
[Tue Oct 17 11:52:29.289697 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] mod_wsgi (pid=8178): Target WSGI script '/root/geosearch_app/geosearch_project/geosearch_project/wsgi.py' cannot be loaded as Python module.
[Tue Oct 17 11:52:29.289725 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] mod_wsgi (pid=8178): Exception occurred processing WSGI script '/root/geosearch_app/geosearch_project/geosearch_project/wsgi.py'.
[Tue Oct 17 11:52:29.289745 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] Traceback (most recent call last):
[Tue Oct 17 11:52:29.289768 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] File "/root/geosearch_app/geosearch_project/geosearch_project/wsgi.py", line 16, in <module>
[Tue Oct 17 11:52:29.289799 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] application = get_wsgi_application()
[Tue Oct 17 11:52:29.289809 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Tue Oct 17 11:52:29.289827 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] django.setup()
[Tue Oct 17 11:52:29.289836 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup
[Tue Oct 17 11:52:29.289850 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] apps.populate(settings.INSTALLED_APPS)
[Tue Oct 17 11:52:29.289859 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 78, in populate
[Tue Oct 17 11:52:29.289873 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] raise RuntimeError("populate() isn't reentrant")
[Tue Oct 17 11:52:29.289891 2017] [:error] [pid 8178:tid 140000419026688] [remote 131.111.64.116:24169] RuntimeError: populate() isn't reentrant
실제로 설치 스크립트를 제외하고 아무것도 변경하고 이전에 일을하기 때문에 그 일을해야하지 않고이 문제를 해결하기 위해 희망을.
어떤 조언이 필요합니까?
'wsgi.py'가있는 디렉토리에'__init __. py' 파일이 있는지 확인하십시오. ie'cd /path/to/wsgi.py && touch __init __. py' – raratiru
거기에 있습니다. 내가 말했듯이, 모든 것이 오래 전에 일했고 아무 것도 바뀌지 않았습니다. – user4421975
당신이 제공 한 오류에 3 개의 점이 보입니다. 왜 그런가요? '대상 WSGI 스크립트 '/.../ wsgi.py'. 이것은 전혀 정상적인 것이 아닙니다. – raratiru