利用uwsgi配置文件启动时,无法访问 使用8000也无法访问
来源:14-3 uwsgi配置文件方式启动以及代码更新后的重启
qq_饭醉分子_04072649
2020-02-02
[uWSGI] getting INI configuration from uwsgi.ini
*** Starting uWSGI 2.0.18 (64bit) on [Sun Feb 2 12:47:18 2020] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-39) on 02 February 2020 00:48:49
os: Linux-3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019
nodename: localhost.localdomain
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/TowerYwjkxt/conf
detected binary path: /root/.virtualenvs/ywjkxt/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) ***
chdir() to /home/TowerYwjkxt
your processes number limit is 3870
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)
uwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 3
uWSGI running as root, you can use --uid/–gid/–chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Set PythonHome to /root/.virtualenvs/ywjkxt
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0xaa71b0
uWSGI running as root, you can use --uid/–gid/–chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 801944 bytes (783 KB) for 10 cores
*** Operational MODE: preforking ***
WSGI app 0 (mountpoint=’’) ready in 2 seconds on interpreter 0xaa71b0 pid: 5950 (default app)
uWSGI running as root, you can use --uid/–gid/–chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
spawned uWSGI master process (pid: 5950)
spawned uWSGI worker 1 (pid: 5955, cores: 1)
spawned uWSGI worker 2 (pid: 5956, cores: 1)
spawned uWSGI worker 3 (pid: 5957, cores: 1)
spawned uWSGI worker 4 (pid: 5958, cores: 1)
spawned uWSGI worker 5 (pid: 5959, cores: 1)
spawned uWSGI worker 6 (pid: 5960, cores: 1)
spawned uWSGI worker 7 (pid: 5961, cores: 1)
spawned uWSGI worker 8 (pid: 5962, cores: 1)
spawned uWSGI worker 9 (pid: 5963, cores: 1)
spawned uWSGI worker 10 (pid: 5964, cores: 1)
1回答
-
bobby
2020-02-03
这里看日志uwsgi启动没有问题,但是你要清楚 uwsgi启动django是在socket端口上监听 所以不要期望能通过浏览器直接访问8000端口就可以访问,因为浏览器是http协议,两者协议不一样,所以要通过nginx转发访问才行
10
相似问题