我正在尝试为Django项目配置uWSGI。不幸的是,当我运行uwsgi可执行文件时,它失败并出现了一个奇怪的错误:
$ bin/uwsgi -s sock/uwsgi.sock --chdir testit --vacuum \
--env DJANGO_SETTINGS_MODULE=testit.testit.settings --wsgi-file testit/wsgi.py --master
*** Starting uWSGI 1.2.3 (32bit) on [Mon Jun 4 17:14:52 2012] ***
compiled with version: 4.7.0 20120414 (prerelease) on 04 June 2012 16:20:49
detected number of CPU cores: 2
current working directory: /home/miki/sites/testit
detected binary path: /home/miki/sites/testit/bin/uwsgi
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
bind(): No such file or directory [socket.c line 107]
我对于该做什么并不是最模糊的想法......我尝试了ulimit
并且它没有用。
答案 0 :(得分:2)
似乎chdir
命令在其他任何内容之前执行,因此如果使用相对路径则无法找到文件。尝试在参数中使用完整路径:
bin/uwsgi -s $PWD/sock/uwsgi.sock --chdir testit --vacuum \
--env DJANGO_SETTINGS_MODULE=testit.testit.settings \
--wsgi-file $PWD/testit/wsgi.py --master