ПРОЕКТЫ 


  АРХИВ 


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]

Re: проблема с несколькими fastc gi_pass


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: проблема с несколькими fastc gi_pass
  • From: Dmytro Korochkin <mityacor@xxxxxxxxx>
  • Date: Thu, 2 Apr 2009 18:36:12 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ZG2lyLfFk8BxBbv4cq6U2nKctX9E+qCEwESzatjnnoU=; b=ZvJg6Kyn0ShT7tVkTz0LrUW59JUtWBh+aBz3/Oon7KmJl3vptfFWLB0yD5yepWdTvw tFxgeKR6tZHdX6F9g0BoF0N898Xdb7EA4zn6Bvy8P8K9UizJy6FmBqSyOczxvBTFxopK EG2ePBqvBnU8VYSg+APB4caiusJulGW0Xj9wY=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ZjC7jtEGoaUn0VNpsDfzYSj7wbK+4V63JmEq9OKA41VzkipY5lZSEAQeOAEomOtAVd rUc5FUr0M4OcYrh6VmYgtmmolfp1HBphjKYMBBG+pZ9A9nXzL07q5U6ZRT7yfKLfIzZV jLMIFVGoHo6Gpdb2Eopk0stlNegzkTwQ+dZEM=
  • In-reply-to: <20090402145221.GD74434@xxxxxxxxxxxxx>
  • References: <a560fc970904020736o35ea158al823eff593d512f29@xxxxxxxxxxxxxx> <20090402145221.GD74434@xxxxxxxxxxxxx>

0.6.36

2009/4/2 Igor Sysoev <is@xxxxxxxxxxxxx>:
> On Thu, Apr 02, 2009 at 05:36:38PM +0300, Dmytro Korochkin wrote:
>
>> Добрый день,
>>
>> У меня есть следующая конфигурация:
>> ========================================
>> ...
>> upstream  api_checker_server  {
>>         server 127.0.0.1:6500;
>> }
>>
>> upstream  aga_server  {
>>        ip_hash;
>>          server 10.10.10.1:6500;
>> }
>>
>> server {
>>       listen   8081;
>>
>>         location / {
>>                    rewrite   /  $uri?service_type=aga_service  break;
>>                     fastcgi_pass api_checker_server;
>>                     include /etc/nginx/fcgi_params;
>>                     fastcgi_intercept_errors on;
>>                     error_page   404 =200 @aga;
>>                     error_page   500 =200 @aga;
>>                     error_page   502 =200 @aga;
>>
>>         }
>>
>>       location @aga {
>>                   # host and port to fastcgi server
>>                   fastcgi_pass tile_server;
>>                   fastcgi_param PATH_INFO $fastcgi_script_name;
>>                   fastcgi_param REQUEST_METHOD $request_method;
>>                   fastcgi_param QUERY_STRING $query_string;
>>                   fastcgi_param CONTENT_TYPE $content_type;
>>                   fastcgi_param CONTENT_LENGTH $content_length;
>>                   fastcgi_param  SERVER_ADDR        $server_addr;
>>                   fastcgi_param  SERVER_PORT        $server_port;
>>                   fastcgi_param  SERVER_NAME        $server_name;
>>                   fastcgi_param  SERVER_PROTOCOL    $server_protocol;
>>                   fastcgi_pass_header Authorization;
>>                   fastcgi_intercept_errors off;
>>       }
>>
>> }
>> ....
>> ===================================
>> За обоими fastcgi_pass стоят pylons.
>>
>> Запрос от клиента проходит через первый fastcgi_pass и переходит ко
>> второму. На нем я вижу что запрос передается корректно, правильно
>> обрабатывается, но при ответе nginx выдает 502. При включении debug
>> вижу сдежущее:
>>
>> ===============================================
>> 2009/04/02 10:53:02 [debug] 28038#0: *1 http upstream process header
>> 2009/04/02 10:53:02 [debug] 28038#0: *1 malloc: 000000000069B760:4096
>> 2009/04/02 10:53:02 [debug] 28038#0: *1 recv: fd:9 8 of 4096
>> 2009/04/02 10:53:02 [debug] 28038#0: *1 http fastcgi record byte: 00
>> 2009/04/02 10:53:02 [error] 28038#0: *1 upstream sent unsupported
>> FastCGI protocol version: 0 while reading response header from
>> upstream, client: 192.168.1.1, server: stressweb, URL:
>> "/ID/1/256/5/17/10.png", upstream: "fastcgi://10.10.10.1", host:
>> "192.168.1.10"
>> ===============================================
>>
>> Что интересно, если исключить fastcgi_pass из первого location, то все
>> работает корректно:
>>
>> 2009/04/02 11:36:58 [debug] 26859#0: *113 http fastcgi record byte: 01
>>
>> Понимаю, проблема скорее всего не в nginx, но все же, где копать? Что
>> такого шлет nginx в первом случае, что заставляет pylons выставлять
>> record type 00?
>
> Какая версия nginx'а ? Это было исправлено в 0.7.27.
>
>
> --
> Игорь Сысоев
> http://sysoev.ru
>
>



-- 
Mitya
Follow me on Twitter http://twitter.com/mityacor


 




Copyright © Lexa Software, 1996-2009.