uWSGI uwsgi uwsgi.ini 启动报错怎么办
[root@VM_0_15_centos ~]# cd /www
[root@VM_0_15_centos www]# uwsgi uwsgi.ini
[uWSGI] getting INI configuration from uwsgi.ini
*** Starting uWSGI 2.0.18 (64bit) on [Sun Aug 11 20:18:39 2019] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-36) on 11 August 2019 11:49:00
os: Linux-3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018
nodename: VM_0_15_centos
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /www
detected binary path: /usr/local/bin/uwsgi
setgid() to 1000
setuid() to 1000
chdir() to /www
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 3882
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 socket 0 bound to TCP address 127.0.0.1:9000 fd 3
Python version: 3.7.0 (default, Aug 11 2019, 19:03:29)  [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Python main interpreter initialized at 0x1ef25f0
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 333504 bytes (325 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
added /www/ to pythonpath.
ModuleNotFoundError: No module named 'www'
unable to load app 0 (mountpoint='') (callable not found or import error)
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1ef25f0 pid: 26222 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (pid: 26222, cores: 2)
spawned uWSGI worker 2 (pid: 26223, cores: 2)
spawned uWSGI worker 3 (pid: 26224, cores: 2)
spawned uWSGI worker 4 (pid: 26225, cores: 2)

启动报错已经解决了一个,但是其他的实在没办法
大神,怎么解决
之前没这个问题,出现之后不管怎么重新装系统都解决不了

以下是配置文件

[uwsgi]
uid = www
gid = www
socket = 127.0.0.1:9000

chdir = /www

module=www.wsgi

wsgi-file = /www/hello.py

callable = app

processes = 4

threads = 2

pythonpath = /www

十分感激,实在是找不到方法了,网络上的都找了

2个回答

added /www/ to pythonpath.
ModuleNotFoundError: No module named 'www'

这是报的错误信息,你的配置是

module=www.wsgi

你在www目录下,创建一个__init__.py的文件试试

wutuo2048
wutuo2048 感谢你的解答,谢谢
12 个月之前 回复
[uwsgi]
uid = www
gid = www
socket = 127.0.0.1:9000
master = true
chdir = /www

wsgi-file = /www/hello.py

callable = app

processes = 4

threads = 2
module = run
pythonpath = /www
stats = %(chdir)/uwsgi/uwsgi.status
pidfile= %(chdir)/uwsgi/uwsgi.pid
daemonize = /var/log/uwsgi.log #日志路径

出问题的原因自己找到,太不容易了
将配置文件修改成上方所示,成功启动

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐