日志
*** Starting uWSGI 2.0.18 (64bit) on [Fri Apr 15 18:52:46 2022] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-44) on 15 April 2022 10:16:59
os: Linux-3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021
nodename: VM-16-9-centos
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /www/wwwroot/zrhd_bj
writing pidfile to uwsgi.pid
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /www/wwwroot/zrhd_bj/
your processes number limit is 7265
your memory page size is 4096 bytes
detected max file descriptor number: 100001
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
probably another instance of uWSGI is running on the same address (127.0.0.1:8000).
bind(): Address already in use [core/socket.c line 769]
运行没提示错误 [uWSGI] getting INI configuration from uwsgi.ini
进程就一个 root 5590 0.0 0.0 112812 980 pts/0 S+ 18:59 0:00 grep --color=auto uWSGI
访问就 503
求解
1
l4ever 2022-04-15 19:04:35 +08:00
probably another instance of uWSGI is running on the same address (127.0.0.1:8000).
bind(): Address already in use [core/socket.c line 769] |
2
hsfzxjy 2022-04-15 19:06:59 +08:00 via Android
你要 grep uwsgi 吧
|
3
snBDX1b0jJM4ogKd 2022-04-15 19:14:48 +08:00 via Android
lsof -i :8000
|
4
maloneleo88 OP 新日志
``` *** Starting uWSGI 2.0.18 (64bit) on [Fri Apr 15 19:23:50 2022] *** compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-44) on 15 April 2022 10:16:59 os: Linux-3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 nodename: VM-16-9-centos machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 2 current working directory: /www/wwwroot/zrhd_bj writing pidfile to uwsgi.pid detected binary path: /usr/local/bin/uwsgi uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** chdir() to /www/wwwroot/zrhd_bj/ your processes number limit is 7265 your memory page size is 4096 bytes detected max file descriptor number: 100001 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uWSGI http bound on 127.0.0.1:8000 fd 4 uwsgi socket 0 bound to TCP address 127.0.0.1:37372 (port auto-assigned) 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: 3.8.10 (default, Apr 15 2022, 15:06:15) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] Python main interpreter initialized at 0x1fafb10 uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** python threads support enabled your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 166752 bytes (162 KB) for 2 cores *** Operational MODE: threaded *** failed to open python file /zrhd_bj/wsgi.py unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 2115) spawned uWSGI worker 1 (pid: 2116, cores: 2) spawned uWSGI http 1 (pid: 2117) ``` |
5
among 2022-04-15 19:33:53 +08:00
failed to open python file /zrhd_bj/wsgi.py
unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** |
6
maloneleo88 OP @among
wsgi import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'zrhd_bj.settings') application = get_wsgi_application() 默认的 没动过呀 |
7
SenLief 2022-04-15 19:40:51 +08:00
这不是提示 8000 端口被占用了吗?换个口试试。
|
8
sujin190 2022-04-15 19:43:30 +08:00
这么明显的错误了吧,要么配置文件目录写错了,要么执行目录弄错了,这个运行方式、启动命令、配置文件都不发没人知道你哪写错了
|
9
cz5424 2022-04-15 20:03:12 +08:00 via iPhone
端口占用
|
10
zeusho871 2022-04-16 05:38:57 +08:00 via Android
都用 uwsgi 了,试试用 unix socket ?
|
11
Quarter 2022-04-16 07:52:36 +08:00 via iPhone
你这个进程就是你的 grep 啊😅
|
12
elboble 2022-04-16 16:42:18 +08:00
是不是 apt 或者 yum 装的 uwsgi ?
建议删了用 pip install 安装 |
13
maloneleo88 OP |