ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Upstream split a header in FastCGI


  • To: nginx-ru@xxxxxxxxx
  • Subject: Upstream split a header in FastCGI
  • From: Grigory Batalov <bga@xxxxxxxxx>
  • Date: Fri, 17 Feb 2006 19:32:41 +0300
  • Organization: TEPKOM

Здравствуйте!

Хочу настроить FastCGI, но получаю постоянно ошибку
"502 Bad Gateway". В error.log пишут:

2006/02/17 18:57:51 [alert] 15689#0: *46 upstream split a header in FastCGI 
records while reading response header from upstream, client: 127.0.0.1, server: 
localhost, URL: "/trac/", upstream: "fastcgi://127.0.0.1:1027"

Что бы это могло означать?

В консоли:

$ telnet localhost 8084
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /trac/
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/0.3.28</center>
</body>
</html>
Connection closed by foreign host.

Настройки nginx.conf:
...
        location /trac/ {
            fastcgi_pass   localhost:1027;
            fastcgi_index  trac.fcgi;
            fastcgi_param  SCRIPT_FILENAME  
/usr/share/trac/cgi-bin/$fastcgi_script_name;
            fastcgi_param  SCRIPT_NAME  
/usr/share/trac/cgi-bin/$fastcgi_script_name;
            fastcgi_param  QUERY_STRING     $query_string;
            fastcgi_param  REQUEST_METHOD   $request_method;
            fastcgi_param  CONTENT_TYPE     $content_type;
            fastcgi_param  CONTENT_LENGTH   $content_length;
        }
...

Если интересно, этот самый trac.fcgi также пишет в (свой) лог:

Feb 17 18:57:50 fcgi: read: fd = 7, type = 1, requestId = 1, contentLength = 8
Feb 17 18:57:50 fcgi: read: fd = 7, type = 4, requestId = 1, contentLength = 57
Feb 17 18:57:50 fcgi: read: fd = 7, type = 4, requestId = 1, contentLength = 0
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 13
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 32
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 40
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 39
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 22
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 
113
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 2
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 
7147
(далее HTML текст на 7147 байт)
Feb 17 18:57:51 fcgi: protocolStatus = 0, appStatus = 0
Feb 17 18:57:51 fcgi: write: fd = 7, type = 6, requestId = 1, contentLength = 0
Feb 17 18:57:51 fcgi: write: fd = 7, type = 3, requestId = 1, contentLength = 8
(8 нулевых байт)
Feb 17 18:57:51 fcgi: end_request: flags = 0

Вроде бы всё нормально, но nginx ругается.

-- 
 Григорий Баталов,
 программист
 ЗАО "Ланит-Терком"



 




Copyright © Lexa Software, 1996-2009.