ПРОЕКТЫ 


  АРХИВ 


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: неправильно раб отает proxy_store (nginx/0.6.32)



-error_page           404 = @fetch;
+error_page           404 = @fetchpermfidel;

И еще одна непонятка. Если в работающий proxy_store делается X-Accel-Redirect - то файл отдается нулевого размера. Если файл присутствует - то он отдается нормально, debug log прилагается

2008/08/13 13:04:53 [debug] 9807#0: *17 event timer del: 18: 3142578808
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 find location for "/redirector2.php"
2008/08/13 13:04:53 [debug] 9807#0: *17 find location: "/"
2008/08/13 13:04:53 [debug] 9807#0: *17 find location: "/streaming/"
2008/08/13 13:04:53 [debug] 9807#0: *17 using configuration "/"
2008/08/13 13:04:53 [debug] 9807#0: *17 http cl:-1 max:16777216
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 2
2008/08/13 13:04:53 [debug] 9807#0: *17 post rewrite phase: 3
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 4
2008/08/13 13:04:53 [debug] 9807#0: *17 access phase: 5
2008/08/13 13:04:53 [debug] 9807#0: *17 access phase: 6
2008/08/13 13:04:53 [debug] 9807#0: *17 post access phase: 7
2008/08/13 13:04:53 [debug] 9807#0: *17 http init upstream, client timer: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 epoll add event: fd:18 op:3 ev:80000005
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script var: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script var: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script var: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "User-Agent: Wget/1.11"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Accept: */*"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header:
"GET /redirector2.php HTTP/1.0
Host: host
X-URI: /redirector2.php
X-Forwarded-For: xxx.xxx.xxx.xxx
Connection: close
User-Agent: Wget/1.11
Accept: */*

"
2008/08/13 13:04:53 [debug] 9807#0: *17 http cleanup add: 085E5FA0
2008/08/13 13:04:53 [debug] 9807#0: *17 get rr peer, try: 1
2008/08/13 13:04:53 [debug] 9807#0: *17 socket 19
2008/08/13 13:04:53 [debug] 9807#0: *17 epoll add connection: fd:19 ev:80000005
2008/08/13 13:04:53 [debug] 9807#0: *17 connect to 127.0.0.1:80, fd:19 #18
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream connect: -2
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer add: 19: 15000:3142563808
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0863EADC
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0863EADC
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream check client, write event:1, "/redirector2.php" 2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream recv(): -1 (11: Resource temporarily unavailable)
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream send request handler
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream send request
2008/08/13 13:04:53 [debug] 9807#0: *17 chain writer buf fl:1 s:173
2008/08/13 13:04:53 [debug] 9807#0: *17 chain writer in: 085E5FBC
2008/08/13 13:04:53 [debug] 9807#0: *17 writev: 173
2008/08/13 13:04:53 [debug] 9807#0: *17 chain writer out: 00000000
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer del: 19: 3142563808
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer add: 19: 60000:3142608809
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0860AB08
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream dummy handler
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0860AB08
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream process header
2008/08/13 13:04:53 [debug] 9807#0: *17 malloc: 085E6750:16384
2008/08/13 13:04:53 [debug] 9807#0: *17 recv: fd:19 202 of 16384
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy status 200 "200 OK"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Date: Wed, 13 Aug 2008 09:04:53 GMT"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Server: Apache"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "X-Powered-By: PHP/5.2.6" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "X-Accel-Redirect: /streaming/276150.mp3" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Content-Length: 0" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Connection: close" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Content-Type: audio/mpeg"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header done
2008/08/13 13:04:53 [debug] 9807#0: *17 finalize http upstream request: -5
2008/08/13 13:04:53 [debug] 9807#0: *17 finalize http proxy request
2008/08/13 13:04:53 [debug] 9807#0: *17 free rr peer 1 0
2008/08/13 13:04:53 [debug] 9807#0: *17 close http upstream connection: 19
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer del: 19: 3142608809
2008/08/13 13:04:53 [debug] 9807#0: *17 internal redirect: "/streaming/276150.mp3?"
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 find location for "/streaming/276150.mp3"
2008/08/13 13:04:53 [debug] 9807#0: *17 find location: "/"
2008/08/13 13:04:53 [debug] 9807#0: *17 find location: "/streaming/"
2008/08/13 13:04:53 [debug] 9807#0: *17 using configuration "/streaming/"
2008/08/13 13:04:53 [debug] 9807#0: *17 http cl:-1 max:16777216
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 2
2008/08/13 13:04:53 [debug] 9807#0: *17 post rewrite phase: 3
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 4
2008/08/13 13:04:53 [debug] 9807#0: *17 access phase: 5
2008/08/13 13:04:53 [debug] 9807#0: *17 access phase: 6
2008/08/13 13:04:53 [debug] 9807#0: *17 post access phase: 7
2008/08/13 13:04:53 [debug] 9807#0: *17 content phase: 8
2008/08/13 13:04:53 [debug] 9807#0: *17 content phase: 9
2008/08/13 13:04:53 [debug] 9807#0: *17 content phase: 10
2008/08/13 13:04:53 [debug] 9807#0: *17 http set discard body
2008/08/13 13:04:53 [debug] 9807#0: *17 http filename: "/www2/host/data/streaming/276150.mp3"
2008/08/13 13:04:53 [debug] 9807#0: *17 add cleanup: 085E61C0
2008/08/13 13:04:53 [error] 9807#0: *17 open() "/www2/host/data/streaming/276150.mp3" failed (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: host, request: "GET /redirector2.php HTTP/1.0", upstream: "http://127.0.0.1:80/redirector2.php";, host: "host" 2008/08/13 13:04:53 [debug] 9807#0: *17 http finalize request: 404, "/streaming/276150.mp3?" 2008/08/13 13:04:53 [debug] 9807#0: *17 http special response: 404, "/streaming/276150.mp3"
2008/08/13 13:04:53 [debug] 9807#0: *17 http set discard body
2008/08/13 13:04:53 [debug] 9807#0: *17 named location: @fetchpermfidel "/streaming/276150.mp3?"
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 2
2008/08/13 13:04:53 [debug] 9807#0: *17 post rewrite phase: 3
2008/08/13 13:04:53 [debug] 9807#0: *17 generic phase: 4
2008/08/13 13:04:53 [debug] 9807#0: *17 access phase: 5
2008/08/13 13:04:53 [debug] 9807#0: *17 access phase: 6
2008/08/13 13:04:53 [debug] 9807#0: *17 post access phase: 7
2008/08/13 13:04:53 [debug] 9807#0: *17 http init upstream, client timer: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script var: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script var: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http script copy: ""
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "User-Agent: Wget/1.11"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Accept: */*"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header:
"GET /redirector2.php HTTP/1.0
Host: 192.168.0.5
X-URI: /redirector2.php
X-Forwarded-For: xxx.xxx.xxx.xxx
Connection: close
User-Agent: Wget/1.11
Accept: */*

"
2008/08/13 13:04:53 [debug] 9807#0: *17 http cleanup add: 085E6548
2008/08/13 13:04:53 [debug] 9807#0: *17 get rr peer, try: 1
2008/08/13 13:04:53 [debug] 9807#0: *17 socket 19
2008/08/13 13:04:53 [debug] 9807#0: *17 epoll add connection: fd:19 ev:80000005 2008/08/13 13:04:53 [debug] 9807#0: *17 connect to 82.179.206.40:80, fd:19 #19
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream connect: -2
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer add: 19: 15000:3142563809
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream send request handler
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream send request
2008/08/13 13:04:53 [debug] 9807#0: *17 chain writer buf fl:1 s:173
2008/08/13 13:04:53 [debug] 9807#0: *17 chain writer in: 085E65C4
2008/08/13 13:04:53 [debug] 9807#0: *17 writev: 173
2008/08/13 13:04:53 [debug] 9807#0: *17 chain writer out: 00000000
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer del: 19: 3142563809
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer add: 19: 60000:3142608811
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0860AB08
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0863EB10
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream dummy handler
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0860AB08
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream process header
2008/08/13 13:04:53 [debug] 9807#0: *17 malloc: 085F1A00:16384
2008/08/13 13:04:53 [debug] 9807#0: *17 recv: fd:19 197 of 16384
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy status 200 "200 OK"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Connection: close" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Date: Wed, 13 Aug 2008 09:05:05 GMT" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Server: Microsoft-IIS/6.0" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "X-Powered-By: ASP.NET" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "X-AspNet-Version: 2.0.50727"
2008/08/13 13:04:53 [debug] 9807#0: *17 malloc: 085EA758:4096
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Cache-Control: private" 2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header: "Content-Length: 0"
2008/08/13 13:04:53 [debug] 9807#0: *17 http proxy header done
2008/08/13 13:04:53 [debug] 9807#0: *17 HTTP/1.1 200 OK
Server: nginx/0.6.32
Date: Wed, 13 Aug 2008 09:04:53 GMT
Connection: keep-alive
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0


2008/08/13 13:04:53 [debug] 9807#0: *17 write new buf t:1 f:0 085EA800, pos 085EA800, size: 197 file: 0, size: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 http write filter: l:0 f:0 s:197
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream process upstream
2008/08/13 13:04:53 [debug] 9807#0: *17 pipe read upstream: 1
2008/08/13 13:04:53 [debug] 9807#0: *17 pipe preread: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 readv: 1:16187
2008/08/13 13:04:53 [debug] 9807#0: *17 pipe recv chain: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 pipe buf free s:0 t:1 f:0 085F1A00, pos 085F1AC5, size: 0 file: 0, size: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 pipe write downstream: 1
2008/08/13 13:04:53 [debug] 9807#0: *17 pipe write downstream done
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer: 19, old: 3142608811, new: 3142608939
2008/08/13 13:04:53 [debug] 9807#0: *17 add cleanup: 085EAA34
2008/08/13 13:04:53 [debug] 9807#0: *17 hashed path: /www2/tmp/nginx/0000000001
2008/08/13 13:04:53 [debug] 9807#0: *17 temp fd:20
2008/08/13 13:04:53 [debug] 9807#0: *17 upstream stores "/www2/tmp/nginx/0000000001" to "/www2/host/data/streaming/276150.mp3"
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream exit: 00000000
2008/08/13 13:04:53 [debug] 9807#0: *17 finalize http upstream request: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 finalize http proxy request
2008/08/13 13:04:53 [debug] 9807#0: *17 free rr peer 1 0
2008/08/13 13:04:53 [debug] 9807#0: *17 close http upstream connection: 19
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer del: 19: 3142608811
2008/08/13 13:04:53 [debug] 9807#0: *17 http upstream temp fd: 20
2008/08/13 13:04:53 [debug] 9807#0: *17 http output filter "/streaming/276150.mp3?" 2008/08/13 13:04:53 [debug] 9807#0: *17 copy filter: "/streaming/276150.mp3?" 2008/08/13 13:04:53 [debug] 9807#0: *17 http postpone filter "/streaming/276150.mp3?" BFDE96A8 2008/08/13 13:04:53 [debug] 9807#0: *17 http postpone filter out "/streaming/276150.mp3?" 2008/08/13 13:04:53 [debug] 9807#0: *17 write old buf t:1 f:0 085EA800, pos 085EA800, size: 197 file: 0, size: 0 2008/08/13 13:04:53 [debug] 9807#0: *17 write new buf t:0 f:0 00000000, pos 00000000, size: 0 file: 0, size: 0
2008/08/13 13:04:53 [debug] 9807#0: *17 http write filter: l:1 f:0 s:197
2008/08/13 13:04:53 [debug] 9807#0: *17 http write filter limit 0
2008/08/13 13:04:53 [debug] 9807#0: *17 writev: 197
2008/08/13 13:04:53 [debug] 9807#0: *17 http write filter 00000000
2008/08/13 13:04:53 [debug] 9807#0: *17 copy filter: 0 "/streaming/276150.mp3?" 2008/08/13 13:04:53 [debug] 9807#0: *17 http finalize request: 0, "/streaming/276150.mp3?"
2008/08/13 13:04:53 [debug] 9807#0: *17 set http keepalive handler
2008/08/13 13:04:53 [debug] 9807#0: *17 http close request
2008/08/13 13:04:53 [debug] 9807#0: *17 http log handler
2008/08/13 13:04:53 [debug] 9807#0: *17 run cleanup: 085EAA34
2008/08/13 13:04:53 [debug] 9807#0: *17 file cleanup: fd:20
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085F1A00
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085E6750
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085E5748, unused: 1
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085EA758, unused: 3049
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer add: 18: 2000:3142550939
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085E50B8
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085E5340
2008/08/13 13:04:53 [debug] 9807#0: *17 hc free: 00000000 0
2008/08/13 13:04:53 [debug] 9807#0: *17 hc busy: 00000000 0
2008/08/13 13:04:53 [debug] 9807#0: *17 tcp_nodelay
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0860AAD4
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0860AAD4
2008/08/13 13:04:53 [debug] 9807#0: *17 http keepalive handler
2008/08/13 13:04:53 [debug] 9807#0: *17 malloc: 085E50B8:1024
2008/08/13 13:04:53 [debug] 9807#0: *17 recv: fd:18 -1 of 1024
2008/08/13 13:04:53 [debug] 9807#0: *17 recv() not ready (11: Resource temporarily unavailable)
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0860AAD4
2008/08/13 13:04:53 [debug] 9807#0: *17 post event 0863EADC
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0863EADC
2008/08/13 13:04:53 [debug] 9807#0: *17 http empty handler
2008/08/13 13:04:53 [debug] 9807#0: *17 delete posted event 0860AAD4
2008/08/13 13:04:53 [debug] 9807#0: *17 http keepalive handler
2008/08/13 13:04:53 [debug] 9807#0: *17 recv: fd:18 0 of 1024
2008/08/13 13:04:53 [info] 9807#0: *17 client xxx.xxx.xxx.xxx closed keepalive connection
2008/08/13 13:04:53 [debug] 9807#0: *17 close http connection: 18
2008/08/13 13:04:53 [debug] 9807#0: *17 event timer del: 18: 3142550939
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085E50B8
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 00000000
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 00000000
2008/08/13 13:04:53 [debug] 9807#0: *17 free: 085E3558, unused: 56

Matvei Elyutin пишет:
обнаружилась неправильная работа proxy_store

location /streaming-64 {
                       root                 /www2/vhost/data;
                       error_page           404 = @fetch;
}

location @fetchpermfidel {
                       internal;
                       proxy_pass               http://192.168.0.5:80;
                       proxy_store          on;
                       proxy_store_access   user:rw  group:rw  all:r;
                       proxy_temp_path /www2/tmp/nginx;

                       root                 /www2/host/data;
}

При это файл отдается нормально, но не создается структура каталогов внутри proxy_store и файл не сохраняется. права на создание есть.

Если изменить следующим образом:
- location /streaming-64 {
+ location /streaming {

то все работает. Создается структура каталогов и файл нормально сохраняется.

Такое ощущение, что виной всему симвос "-".
Если нужна дополнительная информация - вышлю.





 




Copyright © Lexa Software, 1996-2009.