我正在尝试使用gunicorn和nginx部署我的django项目,我遵循本指南:http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/。我创建了bash脚本gunicorn_start
:http://pastebin.com/J86MQZYa
但是当我运行这个脚本时,我遇到了错误:
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: ''
希望有人可以帮助我:)。
答案 0 :(得分:0)
当您在第29行使用它时,您在第7行注释掉了GROUP。因此,如果您不想更改默认的USER或GROUP,则将空白GROUP传递给gunicorn,同样适用于USER。然后不要把它传给枪炮。
来自docs:
有效的组ID(作为整数)或可以通过调用pwd.getgrnam(value)检索的用户名,或者不能更改工作进程组的用户名。