简体   繁体   中英

Gunicorn gets into error when start

I am trying to deploy my django project with gunicorn and nginx, i follow this guide: http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/ . i created the bash script gunicorn_start : http://pastebin.com/J86MQZYa but when i run this script, I get into error:

alex@alex-VirtualBox:~/webapps/hello_ice1/bin$ sudo ./gunicorn_start
Starting icecream as root
Traceback (most recent call last):
File "/home/alex/webapps/hello_ice1/icecream/../bin/gunicorn", line 9, in <module>
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')()
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 28, in __init__
self.do_load_config()
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 32, in do_load_config
self.load_config()
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 99, in load_config
self.cfg.set(k.lower(), v)
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/config.py", line 66, in set
self.settings[name].set(value)
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/config.py", line 248, in set
self.value = self.validator(val)
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/config.py", line 30, in _wrapped
return func(*args, **kwargs)
File "/home/alex/webapps/hello_ice1/local/lib/python2.7/site-packages/gunicorn/config.py", line 374, in validate_group
raise ConfigError("No such group: '%s'" % val)
gunicorn.errors.ConfigError: No such group: ''

Hope that somebody can help me :)

You commented out the GROUP on line 7 while you are using it on line 29. As a result you are passing blank GROUP to the gunicorn, same goes for USER, if you do not want to change the default USER or GROUP, then do not pass it to the gunicorn.

From docs:

A valid group id (as an integer) or the name of a user that can be retrieved with a call to pwd.getgrnam(value) or None to not change the worker processes group.

http://docs.gunicorn.org/en/latest/configure.html#group

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM