uWSGI-server nicht antwortet

Ich versuche, führen Sie eine Django-Anwendung mit Nginx + uWSGI ohne Erfolg.
Nach stundenlangem googeln und debugging machte ich die einfachste mögliche uwsgi-Konfiguration, die arbeiten müssen:

$ uwsgi --http 127.0.0.1:8000 --wsgi-file test.py

Wo test.py ist

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return "Hello World"

Das problem ist: es funktioniert nicht. Ein wget-Aufruf auf dem gleichen Rechner hängt:

$ wget http://127.0.0.1:8000
--2013-04-28 12:43:36--  http://127.0.0.1:8000/
Connecting to 127.0.0.1:8000... connected.
HTTP request sent, awaiting response... 

uWSGI-Ausgang ist stummgeschaltet (außer für erste Informationen):

*** Starting uWSGI 1.9.8 (32bit) on [Sun Apr 28 12:43:56 2013] ***
compiled with version: 4.4.5 on 28 April 2013 06:22:28
os: Linux-2.6.27-ovz-4 #1 SMP Mon Apr 27 00:26:17 MSD 2009
...

Die Verbindung ist in der Tat, denn das töten von uWSGI bricht wget.

Wahrscheinlich uWSGI ist nicht detailliert genug über die aufgetretenen Fehler, oder muss ich was verpasst habe.
Jeden Tipp, wo weiter zu suchen ist geschätzt.

Update:

Weitere system-details: Debian 6.0.7, Python-2.6.6.

Einer vollständigen uWSGI log auf der Startseite:

$ uwsgi --http 127.0.0.1:8000 --wsgi-file test.py
*** Starting uWSGI 1.9.8 (32bit) on [Mon Apr 29 04:50:03 2013] ***
compiled with version: 4.4.5 on 28 April 2013 06:22:28
os: Linux-2.6.27-ovz-4 #1 SMP Mon Apr 27 00:26:17 MSD 2009
nodename: max.local
machine: i686
clock source: unix
detected number of CPU cores: 4
current working directory: /home/user/dir
detected binary path: /home/user/dir/env/ENV/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
uWSGI http bound on 127.0.0.1:8000 fd 4
spawned uWSGI http 1 (pid: 19523)
uwsgi socket 0 bound to TCP address 127.0.0.1:57919 (port auto-assigned) fd 3
Python version: 2.6.6 (r266:84292, Dec 27 2010, 00:18:12)  [GCC 4.4.5]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x80f6240
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 63944 bytes (62 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x80f6240 pid: 19522 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 19522, cores: 1)

Und sonst nichts ist jemals gedruckt wurden.

Bitte melden Sie die vollständigen uWSGI startup Protokolle, das Beispiel, das Sie berichtet, überall zu arbeiten (es sei denn, Sie sind mit Python ist3, erfordert eine andere Rendite-Objekt), aber vielleicht gibt es einige andere Probleme. Von dem, was Sie beschreiben, es sieht aus wie eine Art firewall auf Ihrem system, aber es wäre seltsam, auf 127.0.0.1...

InformationsquelleAutor Maxim | 2013-04-28

Schreibe einen Kommentar