web业务部署_服务器_Nginx(常见异常与简单处理)

异常信息 异常解读 异常处理

nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (13: Permission denied)
2020/04/12 09:46:29 [emerg] 3418#0: open() "/usr/local/nginx/logs/access.log" failed (13: Permission denied)

用户权限不够,启动异常 改用root用户,运行启动
Openssl  is not properly installed on your system.can not include OpenSSL headers files.  在安装依赖openssl的软件时可能会报error,这时需要先解决error再继续编译安装 使用yum 安装 openssl以及openssldevel 
 *** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.   使用yum进行安装,yum -y insall libnl libnl-devel libngnetlink-devel 
     
 

RuntimeError: populate() isn't reentrant
unable to load app 0 (mountpoint='192.168.234.134|') (callable not found or import error)
--- no python application found, check your startup logs for errors ---

 启动异常,找不到对应的app。常见于版本不兼容,或者uwsgi.ini文件配置内容错误。

解决方式,1 确定软件版本兼容性

2 /etc/uwsgi/uwsgi.ini文件中,确定module参数指定的django项目信息准确完整。示例,odule=vir_web001_test01.wsgi:application

     
 inner server error 服务运行内部错误  使用tailf /var/log/uwsgi9090.log 查看动态日志 。其中的日志文件,是在uwsgi.ini文件中配置的,指定的日志输出文件。
 ModuleNotFoundError:No Module named ‘django’ 未找到django  到 /etc/uwsgi/uwsgi.ini文件中,1 核实django是否已经安装,找到之后,使用pwd拿到完整目录,2 核实django的配置信息是否准确 

pythonpath=/usr/local/python3/lib/python3.8/site-packages

 python3 command not found,

python3启动命令未找到 

可能是没安装python3,或者python3没有配置到环境变量。1 安装python3   2 将python3 的执行文件路径添加到环境变量中,将python3的执行目录/usr/local/python3/bin/添加到,/etc/profile中。PATH=$PATH:/usr/local/python3/bin/,添加完成,重新载入一下环境变量,source /etc/profile/ 

No module named '_sqlite3'

未找到_sqlite3模块

先使用find / -name _sqlite3,在全局查找有没有安装sqlite,可能会安装在默认的Python2的目录中,拷贝一份,放在python3的对应目录下,常见于,/usr/local/python3/lib/python3.8/lib-dynload/,如果没有安装sqlite,则直接yum -y install sqlite,安装完成之后,需要重新编译make、make install安装一遍python

SQLite 3.8.3 or later is required (found 3.7.17)

 django版本和sqlite版本不兼容

 解决方式有两种,

方式一,给django降版本,pip uninstall django,pip install django==对应的版本号

方式二,升级sqlite,直接到官网上获取需要的sqlite版本,然后安装,最后配置好环境变量即可。注意需要修改共享库和环境变量信息。

     
     
原文地址:https://www.cnblogs.com/shengjie1/p/12683824.html