저는 Centos 6에 기본 플라스크 응용 프로그램을 설치했습니다. 모든 것이 하나의 파일 (app.py)에 포함되어 있습니다. uwsgi --ini myuwsgi.ini
명령으로 폴더 디렉토리에서 uwsgi로 파일을 실행할 수 있으며 모든 것이 잘 작동합니다.Uwsgi는 서비스로 실행될 때 응용 프로그램을로드하지 않습니다.
[uwsgi]
http-socket = :9090
plugin = python
wsgi-file = /project/app.py
process = 3
callable = app
그러나 나는이를 설정할 그래서 매번 서버는 자체에 올 것이라고 종료 또는 무엇이든은 : INI 파일의 내용이다. service uwsgi start
명령을 실행하려고하면 로그에 응용 프로그램이 없음이 표시됩니다. 서비스에서 사용하는 ini 파일은 /etc/uwsgi.ini
이며이를 ini 파일로 바꿨습니다.
도움이된다면 다음과 같이 로그의 덤프는 다음과 같습니다
*** Starting uWSGI 2.0.13.1 (64bit) on [Fri Sep 2 07:49:37 2016] ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-17) on 02 August 2016 21:07:31
os: Linux-2.6.32-042stab113.21 #1 SMP Wed Mar 23 11:05:25 MSK 2016
nodename: uwsgiHost
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory:/
detected binary path: /usr/sbin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 14605
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address :9090 fd 3
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72768 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 1315, cores: 1)
-- unavailable modifier requested: 0 --
내가 INI의 위치와 호출을 지정할 때 응용 프로그램을 찾을 수 없습니다 왜 누군가가 말해 줄 수 있다면?
나는 PARAM없이 좋은, 나는 또한 추가 한 추가 : UID = 10000와 GID = 10000하지만 좋은. 어떻게 UID 값을 설정합니까? 같은 오류가 발생했습니다. – johnfk3
위의 편집 된 응답을 살펴보십시오. – ettanany
문제가 해결되었습니다. 고마워요! – johnfk3