nginx 报错

  1. upstream prematurely closed connection while reading response header from upstream

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

所以是uwsgi出现问题

uwsgi 报错

  1. uwsgi -- unavailable modifier requested: 0

1. 解决办法一

此时uwsgi是用yum安装的

  1. yum search vim uwsgi-plugin-python

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

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

比如我的python是python3.6.4

  1. [root@localhost conf.d]# yum search vim uwsgi-plugin-python
  2. Loaded plugins: fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * epel: mirrors.aliyun.com
  6. * extras: mirrors.aliyun.com
  7. * updates: mirrors.aliyun.com
  8. =============================== N/S matched: vim ===============================
  9. beakerlib-vim-syntax.noarch : Files for syntax highlighting BeakerLib tests in
  10. : VIM editor
  11. fluxbox-vim-syntax.noarch : Fluxbox syntax scripts for vim
  12. neovim.x86_64 : Vim-fork focused on extensibility and agility
  13. protobuf-vim.x86_64 : Vim syntax highlighting for Google Protocol Buffers
  14. : descriptions
  15. python2-neovim.noarch : Python client to Neovim
  16. python34-neovim.noarch : Python client to Neovim
  17. vim-X11.x86_64 : The VIM version of the vi editor for the X Window System
  18. vim-common.x86_64 : The common files needed by any version of the VIM editor
  19. vim-enhanced.x86_64 : A version of the VIM editor which includes recent
  20. : enhancements
  21. vim-filesystem.x86_64 : VIM filesystem layout
  22. vim-go.x86_64 : Go development plugin for Vim
  23. vim-gtk-syntax.noarch : Vim syntax highlighting for GLib, Gtk+, Gstreamer, and
  24. : more
  25. vim-jellybeans.noarch : A colorful, dark color scheme for Vim
  26. vim-minimal.x86_64 : A minimal version of the VIM editor
  27. vim-toml.noarch : Vim syntax for TOML
  28. vim-vimoutliner.noarch : Script for building an outline editor on top of Vim
  29. xtuple-csvimp-devel.x86_64 : CSVImp development files
  30. apvlv.x86_64 : PDF viewer which behaves like Vim
  31. vim-fugitive.noarch : A Git wrapper so awesome, it should be illegal
  32. vim-halibut.noarch : Syntax file for the halibut manual tool
  33. xtuple-csvimp.x86_64 : xTuple data import utility
  34. ======================= N/S matched: uwsgi-plugin-python =======================
  35. uwsgi-plugin-python2.x86_64 : uWSGI - Plugin for Python 2 support
  36. uwsgi-plugin-python2-gevent.x86_64 : uWSGI - Plugin for Python 2 GEvent support
  37. uwsgi-plugin-python2-tornado.x86_64 : uWSGI - Plugin for Tornado (Python 2)
  38. : support
  39. uwsgi-plugin-python34.x86_64 : uWSGI - Plugin for Python 3.4 support
  40. uwsgi-plugin-python34-gevent.x86_64 : uWSGI - Plugin for Python 3.4 GEvent
  41. : support
  42. uwsgi-plugin-python34-tornado.x86_64 : uWSGI - Plugin for Tornado (Python 3.4)
  43. : support
  44. uwsgi-plugin-python36.x86_64 : uWSGI - Plugin for Python 3.6 support
  45. uwsgi-plugin-python36-gevent.x86_64 : uWSGI - Plugin for Python 3.6 GEvent
  46. : support
  47. Name and summary matches mostly, use "search all" for everything.

所以我

  1. [root@localhost conf.d]# yum install uwsgi-plugin-python36
  2. Loaded plugins: fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * epel: mirrors.aliyun.com
  6. * extras: mirrors.aliyun.com
  7. * updates: mirrors.aliyun.com
  8. Resolving Dependencies
  9. --> Running transaction check
  10. ---> Package uwsgi-plugin-python36.x86_64 0:2.0.17.1-1.el7 will be installed
  11. --> Processing Dependency: uwsgi-plugin-common = 2.0.17.1-1.el7 for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
  12. --> Processing Dependency: python36 for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
  13. --> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64
  14. --> Running transaction check
  15. ---> Package python36.x86_64 0:3.6.6-1.el7 will be installed
  16. ---> Package python36-libs.x86_64 0:3.6.6-1.el7 will be installed
  17. ---> Package uwsgi-plugin-common.x86_64 0:2.0.17.1-1.el7 will be installed
  18. --> Finished Dependency Resolution
  19. Dependencies Resolved
  20. ================================================================================
  21. Package Arch Version Repository Size
  22. ================================================================================
  23. Installing:
  24. uwsgi-plugin-python36 x86_64 2.0.17.1-1.el7 epel 80 k
  25. Installing for dependencies:
  26. python36 x86_64 3.6.6-1.el7 epel 66 k
  27. python36-libs x86_64 3.6.6-1.el7 epel 8.6 M
  28. uwsgi-plugin-common x86_64 2.0.17.1-1.el7 epel 53 k
  29. Transaction Summary
  30. ================================================================================
  31. Install 1 Package (+3 Dependent packages)
  32. Total download size: 8.8 M
  33. Installed size: 37 M
  34. Is this ok [y/d/N]: y
  35. Downloading packages:
  36. (1/4): python36-3.6.6-1.el7.x86_64.rpm | 66 kB 00:02
  37. (2/4): python36-libs-3.6.6-1.el7.x86_64.rpm | 8.6 MB 00:00
  38. (3/4): uwsgi-plugin-common-2.0.17.1-1.el7.x86_64.rpm | 53 kB 00:00
  39. (4/4): uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64.rpm | 80 kB 00:00
  40. --------------------------------------------------------------------------------
  41. Total 2.3 MB/s | 8.8 MB 00:03
  42. Running transaction check
  43. Running transaction test
  44. Transaction test succeeded
  45. Running transaction
  46. Installing : python36-3.6.6-1.el7.x86_64 1/4
  47. Installing : python36-libs-3.6.6-1.el7.x86_64 2/4
  48. Installing : uwsgi-plugin-common-2.0.17.1-1.el7.x86_64 3/4
  49. Installing : uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64 4/4
  50. Verifying : uwsgi-plugin-python36-2.0.17.1-1.el7.x86_64 1/4
  51. Verifying : python36-libs-3.6.6-1.el7.x86_64 2/4
  52. Verifying : python36-3.6.6-1.el7.x86_64 3/4
  53. Verifying : uwsgi-plugin-common-2.0.17.1-1.el7.x86_64 4/4
  54. Installed:
  55. uwsgi-plugin-python36.x86_64 0:2.0.17.1-1.el7
  56. Dependency Installed:
  57. python36.x86_64 0:3.6.6-1.el7
  58. python36-libs.x86_64 0:3.6.6-1.el7
  59. uwsgi-plugin-common.x86_64 0:2.0.17.1-1.el7
  60. Complete!

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

=成功解决BUG的第三天=

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

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

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

只能祭出终极绝招了!

2. 解决办法二

首先卸载了yum安装的uwsgi

  1. 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. uitextview根据内容算高度

    UITextView根据内容自动改变frame 分类: iOS2013-03-08 07:27 190人阅读 评论(0) 收藏 举报 注意点: 在textview中计算string占据的高度不能使用[ ...

  2. 一个死去的网站shige.laiyo.com

    2017年4月份的时候,研一下刚刚开始. 爬了这个网站,现在这个网站已经关闭了,这些爬虫代码也就没用了,面向特定网站爬虫本身就是没有意义的. 爬author import requests from ...

  3. 用ElasticSearch存储日志

    介绍 如果你使用elasticsearch来存储你的日志,本文给你提供一些做法和建议. 如果你想从多台主机向elasticsearch汇集日志,你有以下多种选择: Graylog2 安装在一台中心机上 ...

  4. 在Hadoop1.2.1上运行第一个Hadoop程序FileSystemCat

  5. Python之包管理工具

    安装Python包的过程中,经常涉及到distutils.setuptools.distribute.setup.py.easy_install.easy_install和pip等等. distuil ...

  6. 【java】解析JToolBar类的使用

    1.简介 在大部分的Look and Feels下,用户都可以把该工具条拖离原Window组件(除非floatable属性设置为false).为了能够正常的实现拖动效果,该类的实例被建议添加到Bord ...

  7. oracle下导出某用户所有表的方法

    oracle下导出某用户所有表的方法 scott/tiger是用户名和密码,handson是导出的实例名 按用户方式导出数据(owner当中写的是用户名) exp scott/tiger@handso ...

  8. Windows 重装系统-用户转移User和Program Files 文件夹

    原文地址:https://blog.csdn.net/sinat_38799924/article/details/74059037 重装系统时为了让系统数据保持可用我们需要做一些备份处理.比如用户数 ...

  9. JQuery EasyUI Combobox的onChange事件

    html中的select 的change事件 <select id="consult_province" name="consult_province" ...

  10. Mac OS X各版本号的历史费用和升级关系

     Mac OS X各版本号的历史费用和升级关系 OS X 10.6 Snow Leopard 早在2009年10月,Mac OS X10.6雪豹是通过光盘发送.并在英国推出时.费用£25 OS X ...