하지 않은 폴더에서 gunicorn 실행하는 방법의이 /home/telessaude
를 호출 할 수 있습니다. 그래서 프로젝트 루트 내가 장고 프로젝트 홈 폴더 (/ 홈/telessaude/telessaude_branch_master)의 내부입니다 경우 /home/telessaude/telessaude_branch_master
내 홈 폴더에서 프로젝트를 복제 이눔 장고 프로젝트 폴더
에 위치하고 있으며 gunicorn의 령 어를 발행 등
gunicorn -w 2 -b 0.0.0.0:8000 telessaude.wsgi_dev:application --reload --timeout 900
gunicorn 시작을 그냥 작동합니다 벌금. 그러나 ... 나는 (/ 홈/telessaude) 위의 하나의 디렉토리에 동일한 명령을 실행하려고하면, 나는 다음과 같은 오류 얻을 :
[email protected]:~$ gunicorn -w 2 -b 0.0.0.0:8000 telessaude.wsgi_dev:application --reload --timeout 900
[2017-03-22 16:39:28 +0000] [10405] [INFO] Starting gunicorn 19.6.0
[2017-03-22 16:39:28 +0000] [10405] [INFO] Listening at: http://0.0.0.0:8000 (10405)
[2017-03-22 16:39:28 +0000] [10405] [INFO] Using worker: sync
[2017-03-22 16:39:28 +0000] [10410] [INFO] Booting worker with pid: 10410
[2017-03-22 16:39:28 +0000] [10410] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 557, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 136, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 357, in import_app
__import__(module)
ImportError: No module named telessaude.wsgi_dev
가 나는 또한
내 홈 폴더에 gunicorn을 실행하는 노력을 gunicorn -w 2 -b 0.0.0.0:8000 telessaude_branch_master.telessaude.wsgi_dev:application --reload --timeout 900
및
gunicorn -w 2 -b 0.0.0.0:8000 /home/telessaude/telessaude_branch_master/telessaude.wsgi_dev:application --reload --timeout 900
가상 환경을 사용하고 있지 않습니다.
굉장! 감사!!! –
고마워요! 나는 systemd 서비스 파일에서 적절한 명령을 지정할 수 없었기 때문에 멈췄다. --chdir 옵션이 트릭을 만들었습니다! – tebanep