nginx 报错

upstream prematurely closed connection while reading response header from upstream

说明是上游服务器出现了问题

所以是uwsgi出现问题

uwsgi 报错

uwsgi -- unavailable modifier requested: 0

1. 解决办法一

此时uwsgi是用yum安装的

yum search vim uwsgi-plugin-python

找到对应版本的uwsgi-plugin-python,yum install一下

然后在ini文件中添加plugins = python,或者命令行添加–plugin python

比如我的python是python3.6.4

[root@localhost conf.d]# yum search vim uwsgi-plugin-python
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
=============================== N/S matched: vim ===============================
beakerlib-vim-syntax.noarch : Files for syntax highlighting BeakerLib tests in
: VIM editor
fluxbox-vim-syntax.noarch : Fluxbox syntax scripts for vim
neovim.x86_64 : Vim-fork focused on extensibility and agility
protobuf-vim.x86_64 : Vim syntax highlighting for Google Protocol Buffers
: descriptions
python2-neovim.noarch : Python client to Neovim
python34-neovim.noarch : Python client to Neovim
vim-X11.x86_64 : The VIM version of the vi editor for the X Window System
vim-common.x86_64 : The common files needed by any version of the VIM editor
vim-enhanced.x86_64 : A version of the VIM editor which includes recent
: enhancements
vim-filesystem.x86_64 : VIM filesystem layout
vim-go.x86_64 : Go development plugin for Vim
vim-gtk-syntax.noarch : Vim syntax highlighting for GLib, Gtk+, Gstreamer, and
: more
vim-jellybeans.noarch : A colorful, dark color scheme for Vim
vim-minimal.x86_64 : A minimal version of the VIM editor
vim-toml.noarch : Vim syntax for TOML
vim-vimoutliner.noarch : Script for building an outline editor on top of Vim
xtuple-csvimp-devel.x86_64 : CSVImp development files
apvlv.x86_64 : PDF viewer which behaves like Vim
vim-fugitive.noarch : A Git wrapper so awesome, it should be illegal
vim-halibut.noarch : Syntax file for the halibut manual tool
xtuple-csvimp.x86_64 : xTuple data import utility ======================= N/S matched: uwsgi-plugin-python =======================
uwsgi-plugin-python2.x86_64 : uWSGI - Plugin for Python 2 support
uwsgi-plugin-python2-gevent.x86_64 : uWSGI - Plugin for Python 2 GEvent support
uwsgi-plugin-python2-tornado.x86_64 : uWSGI - Plugin for Tornado (Python 2)
: support
uwsgi-plugin-python34.x86_64 : uWSGI - Plugin for Python 3.4 support
uwsgi-plugin-python34-gevent.x86_64 : uWSGI - Plugin for Python 3.4 GEvent
: support
uwsgi-plugin-python34-tornado.x86_64 : uWSGI - Plugin for Tornado (Python 3.4)
: support
uwsgi-plugin-python36.x86_64 : uWSGI - Plugin for Python 3.6 support
uwsgi-plugin-python36-gevent.x86_64 : uWSGI - Plugin for Python 3.6 GEvent
: support Name and summary matches mostly, use "search all" for everything.

所以我

[root@localhost conf.d]# yum install uwsgi-plugin-python36
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package uwsgi-plugin-python36.x86_64 0:2.0.17.1-1.el7 will be installed
--> Processing Dependency: uwsgi-plugin-common = 2.0.17.1-1.el7 for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
--> Processing Dependency: python36 for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
--> Running transaction check
---> Package python36.x86_64 0:3.6.6-1.el7 will be installed
---> Package python36-libs.x86_64 0:3.6.6-1.el7 will be installed
---> Package uwsgi-plugin-common.x86_64 0:2.0.17.1-1.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved ================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
uwsgi-plugin-python36 x86_64 2.0.17.1-1.el7 epel 80 k
Installing for dependencies:
python36 x86_64 3.6.6-1.el7 epel 66 k
python36-libs x86_64 3.6.6-1.el7 epel 8.6 M
uwsgi-plugin-common x86_64 2.0.17.1-1.el7 epel 53 k Transaction Summary
================================================================================
Install 1 Package (+3 Dependent packages) Total download size: 8.8 M
Installed size: 37 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): python36-3.6.6-1.el7.x86_64.rpm | 66 kB 00:02
(2/4): python36-libs-3.6.6-1.el7.x86_64.rpm | 8.6 MB 00:00
(3/4): uwsgi-plugin-common-2.0.17.1-1.el7.x86_64.rpm | 53 kB 00:00
(4/4): uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64.rpm | 80 kB 00:00
--------------------------------------------------------------------------------
Total 2.3 MB/s | 8.8 MB 00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python36-3.6.6-1.el7.x86_64 1/4
Installing : python36-libs-3.6.6-1.el7.x86_64 2/4
Installing : uwsgi-plugin-common-2.0.17.1-1.el7.x86_64 3/4
Installing : uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64 4/4
Verifying : uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64 1/4
Verifying : python36-libs-3.6.6-1.el7.x86_64 2/4
Verifying : python36-3.6.6-1.el7.x86_64 3/4
Verifying : uwsgi-plugin-common-2.0.17.1-1.el7.x86_64 4/4 Installed:
uwsgi-plugin-python36.x86_64 0:2.0.17.1-1.el7 Dependency Installed:
python36.x86_64 0:3.6.6-1.el7
python36-libs.x86_64 0:3.6.6-1.el7
uwsgi-plugin-common.x86_64 0:2.0.17.1-1.el7 Complete!

安装完成后,需要在此项目的uwsgi的ini文件中设置参数plugins = python36

=成功解决BUG的第三天=

今天又部署了一个项目,但是项目是python2.7开发的

然后按照之前的解决方式,安装了uwsgi-plugin-python2 然后ini文件中设置了plugins = python2,依然存在问题

然后又尝试安装uwsgi-plugin-python2-gevent,还是没有用

只能祭出终极绝招了!

2. 解决办法二

首先卸载了yum安装的uwsgi

yum remove uwsgi

然后分别进入两个项目的虚拟环境,在虚拟环境中单独使用pip安装uwsgi

然后再supervisord的ini文件中,指定uwsgi的启动路径(即虚拟环境的bin目录),然后问题解决了!!!

uwsgi -- unavailable modifier requested: 0 -- 的解决办法的更多相关文章

  1. C# 导出 Excel 数字列出现‘0’的解决办法

    在DataGird的中某一列全是数字并且长度大于15的字符,在导出excel时数字列第15-18位全部为0. 解决办法:在需导出数字列前加入英文字符状态的单引号(‘ ), 如: <asp:Tem ...

  2. 启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1) 解决办法

    启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration!  CPU accelerat ...

  3. error while loading shared libraries: libpcre.so.0的解决办法

    error while loading shared libraries: libpcre.so.0的解决办法 http://blog.csdn.net/xjkwq1qq/article/detail ...

  4. LiveCharts 提示框(DataTooltip)百分比一直为0.00%解决办法

    LiveCharts 提示框(DataTooltip)百分比一直为0.00%解决办法 问题描述:在使用LiveCharts 开源图标库的时候,使用CartesianChart类图表,当Series为L ...

  5. Cannot assign requested address的解决办法

    今天想试一下redis,写了个程序,对redis连续进行100000访问,却出现以了Cannot assign requested address的问题,我起先是以为是redis的问题(可能承受不了这 ...

  6. 当display=none时,元素和子元素高度为0的解决办法

    在前端中为了某种需要,我们需要获取display=none的元素或者子元素的实际高度来进行某些处理,然而html对display=none的元素和子元素是不进行渲染的,如果我们没有规定这些元素的高度那 ...

  7. ORBSLAM2与OPENCV3.1.0出错解决办法

    用opencv3.1.0做ORBSLAM2运行一下命令时cd ORB_SLAM2 chmod +x build.sh ./build.sh出错:/usr/bin/ld: CMakeFiles/mono ...

  8. eclipse 和 android studio 编译时报 Unsupported major.minor version 52.0错解决办法

    version 52.0 是java8的环境.当gradle tools 升级到2.2.1时候,可能编译时候会报该错误. 很多网友说更改java version,但是很多时候无效.下面是我遇到时候的解 ...

  9. ajax请求状态码为0的解决办法

    原文链接:https://blog.csdn.net/changqing5818/article/details/53932463 前言 今天遇到个奇怪的问题,使用JQuery的ajax请求,后台的C ...

随机推荐

  1. Oracle的悲观锁和乐观锁

    为了得到最大的性能,一般数据库都有并发机制,不过带来的问题就是数据访问的冲突.为了解决这个问题,大多数数据库用的方法就是数据的锁定. 数据的锁定分为两种方法,第一种叫做悲观锁,第二种叫做乐观锁.什么叫 ...

  2. [翻译]01-ASP.NET MVC 3介绍

    前言 -------------------------- 最近,公司新架构使用asp.net mvc5,一直都是看书学习ASP.NET MVC的,书本毕竟是别人翻译过来的,所以里面可能某些地方翻译有 ...

  3. StatefulSet和Deployment的区别

    “Deployment用于部署无状态服务,StatefulSet用来部署有状态服务”. 具体的,什么场景需要使用StatefulSet呢?官方给出的建议是,如果你部署的应用满足以下一个或多个部署需求, ...

  4. (原)torch模型转pytorch模型

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/7839263.html 目前使用的torch模型转pytorch模型的程序为: https://gith ...

  5. (原)luarocks更新某个模块

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/6424398.html 参考网址: https://github.com/torch/nn/issues ...

  6. lu协程练习

    生产者和消费者问题:当协程调用yield时,从一个悬而未决的resume中返回.简单的协程练习: function receive() local status,value = coroutine.r ...

  7. C/C++查找一定范围内的素数(筛法)

    本文转自于:http://dalu.blogbus.com/logs/37977984.html 由于一个合数总是可以分解成若干个质数的乘积,那么如果把质数(最初只知道2是质数)的倍数都去掉,那么剩下 ...

  8. 【Algorithm】快速排序(续)

    前面在常用的排序算法中,已经写过一篇关于快速排序算法的博客,但是最近看到<The C Programming Language>这本书中的快速排序算法写的不错,所以就拿过来分享一下,下面我 ...

  9. 【LeetCode-面试算法经典-Java实现】【059-Spiral Matrix II(螺旋矩阵II)】

    [059-Spiral Matrix II(螺旋矩阵II)] [LeetCode-面试算法经典-Java实现][全部题目文件夹索引] 原题 Given an integer n, generate a ...

  10. Eclipse安装PlantUML插件

    新技术的诞生和更新,新工具的发现和使用是两件让人开心的事情. 还记得Visio下苦苦的画流程图的时光吗,现在一切都变得so easy,因为有PlantUML! 官网:http://plantuml.c ...