Uwsgi:"无法分配请求的地址"

时间:2014-04-13 18:51:47

标签: python django uwsgi ports

所以我有一个django项目全部设置并准备好了,然后我尝试通过此命令使用uwsgi启动它

# uwsgi --http :5000 --module myProject.wsgi

然后返回此错误日志

** Starting uWSGI 2.0.3 (32bit) on [Sun Apr 13 14:23:55 2014] ***
compiled with version: 4.6.3 on 13 April 2014 14:06:52
os: Linux-2.6.32-042stab078.26 #1 SMP Wed Jun 19 11:05:34 MSK 2013
nodename: vps
machine: i686
clock source: unix
detected number of CPU cores: 1
current working directory: /root/HomeworkTasker
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 191584
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Cannot assign requested address [core/socket.c line 759]

经过一些谷歌搜索后,似乎已经说过这个地址已经在使用中,我已经确定这种情况并非多种原因。第一个原因是如果我进入python shell,我可以用python手动绑定0.0.0.0:5000。另一个原因是,如果我去netstat,则不会列出端口5000。我能在这做什么,还是我SOL?

1 个答案:

答案 0 :(得分:-1)

找到解决方案:

通过运行

确保您的界面正确无误
ifconfig lo up