Welcome! Log In Create A New Profile

Advanced

Apache -> Nginx miration problem. Different tcp options?

June 28, 2009 12:19AM
Hello,

I am in migration process of Joomla with JoomGalery component from apache to nginx. Joomgallery uses http://jupload.sourceforge.net/ applet to upload images. Problem is that Jupload applet do not upload images and returns 'wjhk.jupload2.exception.JUploadException: unexpected EOF (in header)'. I got the same error on different browsers and OS. At first load Jupload applet checks post url with HEAD request. With nginx I got error 'Unable to access to the postURL: 'http://www.server/administrator/index.php?option=com_joomgallery&task=juploadhandler_receive''. To debug problem, I captured tcp stream with tcpdump.

Bellow is tcpdump for apache. Client and server requests are show on left:
21:29:22.974011 IP 192.168.1.158.53590 > server.80: S 1107190968:1107190968(0) win 65535 <mss 1460,nop,wscale 1,nop,nop,timestamp 669841553 0,sackOK,eol>
21:29:23.064207 IP server.80 > 192.168.1.158.53590: S 984647680:984647680(0) ack 1107190969 win 5792 <mss 1460,sackOK,timestamp 367503289 669841553,nop,wscale 7>
21:29:23.064244 IP 192.168.1.158.53590 > server.80: . ack 1 win 33304 <nop,nop,timestamp 669841554 367503289>
21:29:23.064563 IP 192.168.1.158.53590 > server.80: P 1:389(388) ack 1 win 33304 <nop,nop,timestamp 669841554 367503289> - HEAD /administrator/index.php?option=com_joomgallery&task=juploadhandler_receive HTTP/1.1
21:29:23.071329 IP 192.168.1.158.53590 > server.80: F 389:389(0) ack 1 win 33304 <nop,nop,timestamp 669841554 367503289>
21:29:23.156267 IP server.80 > 192.168.1.158.53590: . ack 389 win 54 <nop,nop,timestamp 367503381 669841554>
21:29:23.156299 IP 192.168.1.158.53590 > server.80: F 389:389(0) ack 1 win 33304 <nop,nop,timestamp 669841555 367503381>
21:29:23.200585 IP server.80 > 192.168.1.158.53590: . ack 390 win 54 <nop,nop,timestamp 367503426 669841554>
21:29:23.200637 IP 192.168.1.158.53590 > server.80: . ack 1 win 33304 <nop,nop,timestamp 669841556 367503426>
21:29:23.245360 IP server.80 > 192.168.1.158.53590: . ack 390 win 54 <nop,nop,timestamp 367503470 669841555,nop,nop,sack 1 {389:390}>
21:29:23.334561 IP server.80 > 192.168.1.158.53590: P 1:214(213) ack 390 win 54 <nop,nop,timestamp 367503558 669841556> - HTTP/1.1 200 OK
21:29:23.334566 IP server.80 > 192.168.1.158.53590: F 214:214(0) ack 390 win 54 <nop,nop,timestamp 367503558 669841556>
21:29:23.334626 IP 192.168.1.158.53590 > server.80: . ack 214 win 33197 <nop,nop,timestamp 669841557 367503558>
21:29:23.334654 IP 192.168.1.158.53590 > server.80: . ack 215 win 33197 <nop,nop,timestamp 669841557 367503558>

Bellow is tcpdump for nginx:
19:49:33.805120 IP 192.168.1.158.51975 > server.80: S 4062245563:4062245563(0) win 65535 <mss 1460,nop,wscale 3,nop,nop,timestamp 669781685 0,sackOK,eol>
19:49:33.809760 IP server.80 > 192.168.1.158.51975: S 3823098756:3823098756(0) ack 4062245564 win 5792 <mss 1460,sackOK,timestamp 290138093 669781685,nop,wscale 7>
19:49:33.809808 IP 192.168.1.158.51975 > server.80: . ack 1 win 65535 <nop,nop,timestamp 669781685 290138093>
19:49:33.809973 IP 192.168.1.158.51975 > server.80: P 1:464(463) ack 1 win 65535 <nop,nop,timestamp 669781685 290138093> - HEAD /administrator/index.php?option=com_joomgallery&task=juploadhandler_receive HTTP/1.1
19:49:33.809996 IP 192.168.1.158.51975 > server.80: F 464:464(0) ack 1 win 65535 <nop,nop,timestamp 669781685 290138093>
19:49:33.815810 IP server.80 > 192.168.1.158.51975: . ack 464 win 54 <nop,nop,timestamp 290138098 669781685>
19:49:33.815843 IP 192.168.1.158.51975 > server.80: F 464:464(0) ack 1 win 65535 <nop,nop,timestamp 669781685 290138098>
19:49:33.818232 IP server.80 > 192.168.1.158.51975: F 1:1(0) ack 465 win 54 <nop,nop,timestamp 290138099 669781685>
19:49:33.818262 IP 192.168.1.158.51975 > server.80: . ack 2 win 65535 <nop,nop,timestamp 669781685 290138099>
19:49:33.820036 IP server.80 > 192.168.1.158.51975: . ack 465 win 54 <nop,nop,timestamp 290138104 669781685,nop,nop,sack 1 {464:465}>

Nginx logs:
==> ../logs/access.log <==
192.168.1.158 - - [27/Jun/2009:23:40:36 -0400] "HEAD /administrator/index.php?option=com_joomgallery&task=juploadhandler_receive HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.18 (KHTML, like Gecko) Version/4.0.1 Safari/530.18"

==> ../logs/error.log <==
2009/06/27 23:40:36 [info] 5110#0: *11 client closed prematurely connection, so upstream connection is closed too while sending request to upstream, client: 192.168.1.158, server: server, request: "HEAD /administrator/index.php?option=com_joomgallery&task=juploadhandler_receive HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.server"

In both cases Jupload applet sends following headers:
HEAD /administrator/index.php?option=com_joomgallery&task=juploadhandler_receive HTTP/1.1
Host: www.server
Accept: */*
Accept-Encoding: identity
Connection: close
Cookie: 2d6498ed29010381ca627f9124f1eeba=6fa36898d3935f245e49837a54c8ee64
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.18 (KHTML, like Gecko) Version/4.0.1 Safari/530.18

I tried to enable/disable tcp_nodelay and tcp_nopush in config file, but it didn't help much. Apache and Nginx are running on the same host, so all system sysctl settings are the same.
Subject Author Posted

Apache -> Nginx miration problem. Different tcp options?

atlantos June 28, 2009 12:19AM

Re: Apache -> Nginx miration problem. Different tcp options?

atlantos June 28, 2009 03:37AM

Re: Apache -> Nginx miration problem. Different tcp options?

atlantos June 28, 2009 05:42AM

Re: Apache -> Nginx miration problem. Different tcp options?

Maxim Dounin June 29, 2009 07:51AM

Re: Apache -> Nginx miration problem. Different tcp options?

Nelson Serafica June 28, 2009 08:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 87
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready