uwsgi启动服务无法链接

来源:17-7 uwsgi和nginx配置

慕丝7238044

2020-07-08

老师您好 阿里云服务器 安全组已开放8001端口 启动uwsgi后显示 链接失败

http://img1.sycdn.imooc.com/szimg/5f05277c097be5d004820463.jpg

我的配置文件

# mysite_uwsgi.ini file
[uwsgi]

# Django-related settings
# the base directory (full path)
chdir           = /root/Mxonline
# Django's wsgi file
module          = Mxonline.wsgi
# the virtualenv (full path)

# process-related settings
# master
master          = true
# maximum number of worker processes
processes       = 10
# the socket (use the full path to be safe  处理线程
socket          = 127.0.0.1:8001
# ... with appropriate permissions - may be needed 指明监测的ip地址
# chmod-socket    = 664
# clear environment on exit
vacuum          = true
virtualenv = /root/.virtualenvs/mxonline
# 虚拟环境路径

#logto = /tmp/mylog.log
# 日志文件存放


启动日志

[uWSGI] getting INI configuration from uwsgi.ini

*** Starting uWSGI 2.0.19.1 (64bit) on [Wed Jul  8 09:48:26 2020] ***

compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-39) on 07 July 2020 07:00:02

os: Linux-3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020

nodename: viewsnow

machine: x86_64

clock source: unix

pcre jit disabled

detected number of CPU cores: 1

current working directory: /root/Mxonline/conf/uwsgi

detected binary path: /root/.virtualenvs/mxonline/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 /root/Mxonline

your processes number limit is 6946

your memory page size is 4096 bytes

detected max file descriptor number: 65535

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: 3.7.3 (default, Jul  6 2020, 14:40:26)  [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

PEP 405 virtualenv detected: /root/.virtualenvs/mxonline

Set PythonHome to /root/.virtualenvs/mxonline

*** Python threads support is disabled. You can enable it with --enable-threads ***

Python main interpreter initialized at 0xae9fc0

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 802120 bytes (783 KB) for 10 cores

*** Operational MODE: preforking ***

WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0xae9fc0 pid: 2040 (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: 2040)

spawned uWSGI worker 1 (pid: 2043, cores: 1)

spawned uWSGI worker 2 (pid: 2044, cores: 1)

spawned uWSGI worker 3 (pid: 2045, cores: 1)

spawned uWSGI worker 4 (pid: 2046, cores: 1)

spawned uWSGI worker 5 (pid: 2047, cores: 1)

spawned uWSGI worker 6 (pid: 2048, cores: 1)


写回答

1回答

慕丝7238044

提问者

2020-07-08

已解决 未更新niginx配置文件

0
1
bobby
好的。
2020-07-09
共1条回复

Django+ xadmin 开发在线教育网站

一套通用的技术组合拳,助你解决大部分Python类网站后端问题

1911 学习 · 2149 问题

查看课程