GithubHelp home page GithubHelp logo

Comments (10)

skyzhang2006 avatar skyzhang2006 commented on May 18, 2024

首先打开/web/www/teamvision/teamvision/settings.py文件 在文件内容最上方有个Debug=Flase,将这个值改为True保存,并重启服务。然后再前端打开调试页面,查看登录请求为什么报错。
另外你要确认是0.0.5全新安装,之前没有安装过0.0.4。这两个版本不兼容

from teamvision.

zhangf1021 avatar zhangf1021 commented on May 18, 2024

确认是全新安装的0.0.5 ,整个安装过程基本是执行脚本,
只是安装MySQL时,自己创了一个team_vison的库,然后导入team_vision.sql,
然后安装nginx时,修改了nginx.api.conf里alias /usr/local/python3.5/lib/python3.5/site-packages/rest_framework/static/rest_framework;为alias /usr/python3/lib/python3.5/site-packages/rest_framework/static/rest_framework;
setting.py中 把ALLOWED_HOSTS 更改为自己的服务器ip,修改了MYSQL的相关配置,“NAME”,"USER"和“PASSWORD”,WEB_HOST修改为自己的服务器ip
安装和运行teamvision.sh脚本都未报错,mysql redis nginx mongo等运行正常,但浏览器打开服务器8888端口登陆,发送api/common/user/login请求后返回405 Not Allowed 错误

打开了settings.py里的DEBUG开关,还是报的405 Not Allowed 错误

from teamvision.

skyzhang2006 avatar skyzhang2006 commented on May 18, 2024

nginx默认配置的是8848,端口

from teamvision.

zhangf1021 avatar zhangf1021 commented on May 18, 2024

换成8848后,登陆报500错误,webuwsgi.log里显示:
probably another instance of uWSGI is running on the same address (0.0.0.0:8055).
bind(): Address already in use [core/socket.c line 769]
-- unavailable modifier requested: 3 --
-- unavailable modifier requested: 3 --
-- unavailable modifier requested: 3 --
--- no python application found, check your startup logs for errors ---
180.76.137.179:8848 [pid: 782|app: -1|req: -1/4] 113.57.53.243 () {48 vars in 833 bytes} [Mon Dec 2 20:31:05 2019] POST /api/common/user/login => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 $
--- no python application found, check your startup logs for errors ---
180.76.137.179:8848 [pid: 782|app: -1|req: -1/5] 113.57.53.243 () {48 vars in 834 bytes} [Mon Dec 2 20:31:12 2019] POST /api/common/user/login => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 $

from teamvision.

skyzhang2006 avatar skyzhang2006 commented on May 18, 2024

这是说你的服务起的时候8055端口被占用了

from teamvision.

zhangf1021 avatar zhangf1021 commented on May 18, 2024

重启了下服务,不报8055占用了,但是启动的里面有这个错误,还是报500
*** Operational MODE: preforking ***
added /usr/local/python3.5/lib/python3.5/site-packages to pythonpath.
Traceback (most recent call last):
File "./teamvision/web_wsgi.py", line 7, in
from django.core.wsgi import get_wsgi_application
ImportError: No module named 'django'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
但是我查看django是下载下来了的
Requirement already satisfied: pytz in /usr/python3/lib/python3.5/site-packages (from Django) (2019.3)

在/usr/python3/bin/python3.5下运行 import django
django.VERSION也能正常输出版本号

from teamvision.

skyzhang2006 avatar skyzhang2006 commented on May 18, 2024

如果setting.py里Debug=True打开了,调用接口报错的具体错误信息会有提示。

from teamvision.

zhangf1021 avatar zhangf1021 commented on May 18, 2024

提示还是和上面一样
--- no python application found, check your startup logs for errors ---

from teamvision.

skyzhang2006 avatar skyzhang2006 commented on May 18, 2024

那你检查下django 安装位置和web_uwsig.ini里pythonpath路径写的是不是一致,另外uwsgi也要用python3来编译

from teamvision.

zhangf1021 avatar zhangf1021 commented on May 18, 2024

修改web_uwsig.ini里pythonpath路径后能够正常登陆了,谢谢

from teamvision.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.