django启动uwsgi报错
查看uwsgi.log
*** Starting uWSGI 2.0.17 (64bit) on [Thu Apr 5 17:46:15 2018] ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-18) on 05 April 2018 02:08:03
os: Linux-2.6.32-642.6.2.el6.x86_64 #1 SMP Wed Oct 26 06:52:09 UTC 2016
nodename: GDJ_DEV
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /xxx/xxx/xxx/xxx
writing pidfile to uwsgi.pid
detected binary path: /xxx/xxx/.virtualenvs/h1/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /xxx/xxx/xxx/xxx
your processes number limit is 100000
your memory page size is 4096 bytes
detected max file descriptor number: 100000
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on 172.21.0.5:8000 fd 4
uwsgi socket 0 bound to TCP address 127.0.0.1:33522 (port auto-assigned) fd 3
Python version: 3.6.4 (default, Mar 24 2018, 10:32:21) [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]
Python main interpreter initialized at 0x1ff10d0
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 416880 bytes (407 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
failed to open python file xxx/uwsgi.ini
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 4865)
spawned uWSGI worker 1 (pid: 4866, cores: 2)
spawned uWSGI worker 2 (pid: 4867, cores: 2)
spawned uWSGI worker 3 (pid: 4868, cores: 2)
spawned uWSGI worker 4 (pid: 4869, cores: 2)
spawned uWSGI http 1 (pid: 4870)
--- no python application found, check your startup logs for errors ---
[pid: 4869|app: -1|req: -1/1] 118.26.10.242 () {40 vars in 777 bytes} [Thu Apr 5 17:46:31 2018] GET /user/login/ => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
解决第一个报错,注意操作的先后顺序:
1.卸载uwsgi
pip uninstall uwsgi
#注意此时卸载,pip会有缓存留在系统里
2.安装pcre支持库
yum install pcre pcre-devel pcre-static
3.继续安装uwsgi,不走pip缓存
pip install uwsgi -I --no-cache-dir
#启动uwsgi,已经没有“!!! no internal routing support, rebuild with pcre support !!!”报错了
解决第二个报错:
需要在你的uwsgi.ini文件中module指定项目下面的wsgi:
module=xxx.wsgi
#注:xxx为项目名称,startproject那个项目名称,这个错误解决后,下面的访问错误自然而然的就解决了!
附:我的uwsgi.ini配置文件
[uwsgi]
#socket=ip:port #使用nginx代理请求时配置,直接访问uwsgi使用http方式
http=ip:port
chdir=/xxx/xxx #项目根目录的绝对路径
wsgi-file=xxx/uwsgi.ini #项目目录下的uwsgi.ini
module=xxx.wsgi #指向项目下的wsgi模块
processes=4
threads=2
master=True
py-atuo-reload=1
env=DJANGO_SETTINGS_MODULE=xxx.settings
pidfile=uwsgi.pid
daemonize=uwsgi.log
django启动uwsgi报错的更多相关文章
- 启动uwsgi报错error while loading shared libraries: libpcre.so.1:
启动uwsgi时候报错: [root@ richie]# /usr/bin/uwsgi --ini /usr/local/nginx/conf/uwsgi.ini /usr/bin/uwsgi: er ...
- django启动server报错Error: That port is already in use.
这种一般是端口错误,一般是要把端口关掉,这里提供了两种方法. 方法一:直接命令: sudo lsof -t -i tcp:8000 | xargs kill -9 方法二:脚本:名字manage.py ...
- maven 项目启动tomcat报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
maven项目启动tomcat报错: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...
- 【转】Eclipse下启动tomcat报错:/bin/bootstrap.jar which is referenced by the classpath, does not exist.
转载地址:http://blog.csdn.net/jnqqls/article/details/8946964 1.错误: 在Eclipse下启动tomcat的时候,报错为:Eclipse下启动to ...
- 学习中的错误——ubuntu 14.04 LTS 启动eclipse报错
在ubuntu中启动eclipse报错:(Eclipse:15978): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assert ...
- tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()
JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuch ...
- Eclipse中启动tomcat报错:A child container failed during start
我真的很崩溃,先是workspace崩了,费了好久重建的workspace,然后建立了一个小demo项目,tomcat中启动却报错,挑选其中比较重要的2条信息如下: A child container ...
- Ubuntu下安装了java但启动eclipse报错说没装java
参考资料:http://blog.csdn.net/happyteafriends/article/details/8290950 一.问题 在Ubuntu下安装了java并在~/.bashrc配置了 ...
- VirtualBox启动虚拟机报错0x80004005
Unable to load R3 module C:\Program Files\Oracle\VirtualBox/VBoxDD.DLL (VBoxDD): GetLastError=1790 ( ...
随机推荐
- cut命令及参数企业案列讲解及awk对比
cat oldboy.txt I am oldboy myqq is 49000448 cut -d " " -f3,6 oldboy.txt oldboy 49000448 aw ...
- 如何解决Reporting Services目录数据库文件存在的问题
打开MSSQL数据库管理系统的安装目录,例如:C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA,C:\是你 ...
- C#编写一款qq消息群发器
先上软件成品图 功能编写大概分为以下几个部分了: 获取QQ分组 发送消息 先来讲发送消息吧,实现还是比较简单 //这段主要是用来打开会话窗口的(只能列表中的好友进行会话的) System.Diagno ...
- IDEA jsp模板
> File > Settings- > File and Code Templates > Other >Jsp files >Jsp File.jsp < ...
- Unity3D相机震动效果
在一些格斗.射击以及动作类游戏中 相机震动效果是十分重要的 一个平凡的镜头 在关键时刻加入相机震动后 便可以展现出碰撞.危险.打斗以及激动人心的效果 相机震动的实现方式有很多 但都会涉及摄像机位置的变 ...
- 想在网上保持匿名?教你用Linux如何实现!
想在网上保持匿名?教你用Linux如何实现! 信息时代给我们的生活带来极大便利和好处的同时也带来了很大的风险.一方面,人们只要点击几下按钮,就能基本上访问已知存在的全部信息和知识:另一方面,要是这种权 ...
- PHP自动测试框架Top 10
对于很多PHP开发新手来说,测试自己编写的代码是一个非常棘手的问题.如果出现问题,他们将不知道下一步该怎么做.花费很长的时间调试PHP代码是一个非常不明智的选择,最好的方法就是在编写应用程序代码之前就 ...
- 【转载】Perl中的引用
为什么使用引用? 在perl4中,hash表中的value字段只能是scalar,而不能是list,这对于有些情况是很不方便的,比如有下面的数据: Chicago, USAFrankfurt, Ger ...
- 1.Java关键字和保留字
关键字和保留字 http://www.cnblogs.com/wwxbi/p/4292170.html 访问控制 private protected public 类,方法和变量修饰符 abstrac ...
- 多个input连接在一起的时候如何实现输入一个数字跳入下一个
这个是页面内容 ,我分了12格子,作为一个12位的会员卡号的输入;其实就是12个input我把他们放在了一个div里面 这样配上背景图,看着是一个大的输入框. <div id="A ...