Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uwsgi部署失败 #27

Closed
amu0324 opened this issue Oct 30, 2018 · 2 comments
Closed

uwsgi部署失败 #27

amu0324 opened this issue Oct 30, 2018 · 2 comments

Comments

@amu0324
Copy link

amu0324 commented Oct 30, 2018

命令:uwsgi --http :9005 --chdir /root/metis/app/ --wsgi-file /root/metis/app/controller/settings/wsgi.py --master --processes 4
错误如下:
mapped 364600 bytes (356 KB) for 4 cores
*** Operational MODE: preforking ***
Traceback (most recent call last):
File "/root/metis/app/controller/settings/wsgi.py", line 16, in
application = get_wsgi_application()
File "/usr/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
django.setup(set_prefix=False)
File "/usr/lib/python2.7/site-packages/django/init.py", line 22, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 53, in getattr
self._setup(name)
File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 97, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named settings.settings
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
uWSGI running as root, you can use --uid/--gid/--chroot options

@amu0324 amu0324 closed this as completed Oct 30, 2018
@amu0324
Copy link
Author

amu0324 commented Oct 30, 2018

uwsgi.ini文件如下可以正常启动
[uwsgi]
http = :9005
socket = :9006
chdir = /root/metis/app/controller/
wsgi-file = settings/wsgi.py
master = true
processes = 4
pidfile = uwsgi.pid
daemonize = uwsgi.log

@Jesyjun
Copy link

Jesyjun commented Apr 9, 2019

这个ini配置django可以起来,不过页面读取不到数据库内容,请问一下nginx里面是怎么配置的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants