Upstream split a header in FastCGI

Grigory Batalov bga at tepkom.ru
Fri Feb 17 19:32:41 MSK 2006


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

Хочу настроить 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 ругается.

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





More information about the nginx-ru mailing list