简体   繁体   中英

uwsgi-flask on linux I am trying to run flask with uwsgi on linux

I am trying to run flask on linux using uwsgi. and my webserver is nginx. but it doesn't work.

I am using Vmware for linux. My HostPC is Window.

I share files between guestPC(linux) and hostPC.

the shared_folder path on linux is /mnt/hgfs/shared_folder/web

I made the directory on /venv/web and link this directory, web to /mnt/hfs/shared_folder/web and made the uwsgi.ini file on /venv/web

cat uwsgi.ini:

[uwsgi]

module=run:app
master=true
processes=5

socket=web.sock
chmord-socket=660
vacuum=true

die-on-term=true

logto=%n.log

the log file is:

lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): No such file or directory [core/socket.c line 230]

but when I move the ini file to /venv/ which is not shared directory with window. And I run it with this commnad line: uwsgi uwsgi.ini. It works.

I made this ini file on linux and the format is ASCII.

WHAT am I doing wrong??

You can ignore the "thunder lock" warning.

The problem is likely these two lines

socket=web.sock
chmord-socket=660

First, use an absolute path for the socket to avoid the situation where uwsgi starts in a working directory that's not writeable.

socket=/tmp/web.sock

Then fix the typo (chmod, not chmord)

chmod-socket=660

Also consider providing an absolute path for the logto file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM