2014-04-24 6 views
3

장고를 배포하려고합니다. 그래서 깨끗한 VPS에 모든 것을 설치했습니다. 유니콘을 사용하여 서버를 실행할 수 있지만 supervisord를 사용하려고합니다. 그래서 나는 과거에했던 것처럼 this 튜토리얼을 따라 갔지만 지금은 sudo supervisorctl start uniprogress을 사용하여 앱을 시작할 때 uniprogress: ERROR (abnormal termination)이라고 말하는 오류가 발생합니다. 아래에서 로그 파일을 찾을 수 있습니다.장고 배포, supervisorctl 비정상 종료

파일 :

Starting uniprogress as uniusr 
2014-04-24 04:54:30 [18053] [INFO] Starting gunicorn 18.0 
Traceback (most recent call last): 
    File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module> 
    load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run 
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run 
    Arbiter(self).run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run 
    self.start() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start 
    self.LISTENERS = create_sockets(self.cfg, self.log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets 
    sock = sock_type(addr, conf, log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__ 
    os.remove(addr) 
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock' 
Starting uniprogress as uniusr 
2014-04-24 04:54:31 [18064] [INFO] Starting gunicorn 18.0 
Traceback (most recent call last): 
    File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module> 
    load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run 
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run 
    Arbiter(self).run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run 
    self.start() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start 
    self.LISTENERS = create_sockets(self.cfg, self.log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets 
    sock = sock_type(addr, conf, log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__ 
    os.remove(addr) 
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock' 
Starting uniprogress as uniusr 
2014-04-24 04:54:31 [18064] [INFO] Starting gunicorn 18.0 
Traceback (most recent call last): 
    File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module> 
    load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run 
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run 
    Arbiter(self).run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run 
    self.start() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start 
    self.LISTENERS = create_sockets(self.cfg, self.log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets 
    sock = sock_type(addr, conf, log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__ 
    os.remove(addr) 
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock' 
Starting uniprogress as uniusr 
2014-04-24 04:54:34 [18075] [INFO] Starting gunicorn 18.0 
Traceback (most recent call last): 
    File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module> 
    load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run 
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run 
    Arbiter(self).run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run 
    self.start() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start 
    self.LISTENERS = create_sockets(self.cfg, self.log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets 
    sock = sock_type(addr, conf, log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__ 
    os.remove(addr) 
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock' 
Starting uniprogress as uniusr 
2014-04-24 04:54:37 [18086] [INFO] Starting gunicorn 18.0 
Traceback (most recent call last): 
    File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module> 
    load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run 
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run 
    Arbiter(self).run() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run 
    self.start() 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start 
    self.LISTENERS = create_sockets(self.cfg, self.log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets 
    sock = sock_type(addr, conf, log) 
    File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__ 
    os.remove(addr) 
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock' 
+0

당신이 과정을 시작하려고 사용자 같은데 :'/ 옵션 /의 myapps/run' –

+0

그것은'root' 사용자입니다. 액세스를 허용하는 방법에 대한 제안? – manosim

+0

관리자가 구성한 사용자가 관리자를 실행하는 사용자가 아닙니다 : 'uniestro as uniusr'. –

답변

5

문제 /opt/myapps/logs/gunicorn_supervisor.log는 사용자 uniusr/opt/myapps에 쓸 수있는 권한이 없습니다했던 것이 었습니다. 그래서 이것을 해결하기 위해 내가 한 일은 다음과 같습니다. 폴더에 쓰기 액세스 권한이없는과

sudo chown -R uniusr:users /opt/myapps 
sudo chmod -R g+w /opt/myapps 
+0

감사합니다. 이것은 완벽하게 작동했습니다! –

관련 문제