Varnish showing hex characters from Jakarta-Tomcat connector protocol
David Brown
captkiddo at gmail.com
Mon Jun 28 19:47:35 CEST 2010
We are seeing an unusual behavior attempting to use Varnish to front our web
systems. Currently we use Squid in reverse proxy config for our site.
Our current setup is Tomcat 5.5 -> JK connector 1.2.30 -> SunOne 6.1sp12 ->
Squid 2.7
When we put Varnish 2.1.2 in place of Squid we see hex characters showing up
in content from Tomcat, typically "1ff8".
I tracked down the characters to the AJP/1.3 protocol. According to the
protocol it is the size of the following body part (bytes count in hex).
Various browsers, curl, wget and squid behave correctly and do not display
these characters. Varnish seems to insist on including it in the body of the
content. This only happens when Varnish stores the object in cache (lookup),
when it is set to pass or pipe it does not show up. (we really want to cache
some of this content though)
Here's a bit of a tcpdump to show what I am getting. Line 0150 shows the
1ff8 that is getting included. The content starts right after that at
@CHARSET.
It seems to me Varnish is starting to read the body copy too early and is
including data from the AJP protocol stack into the body.
Is there a way to fix this?
0000 00 1b 63 b1 22 e4 00 12 f2 1d 63 00 08 00 45 00 ..c.".....c...E.
0010 05 8c be fd 40 00 3e 06 6f e4 c0 a8 b4 f7 c0 a8 .... at .>.o.......
0020 d2 41 00 50 d3 54 5c 16 8d 9f 6a 4f 79 7f 80 10 .A.P.T\...jOy...
0030 c0 60 d4 4c 00 00 01 01 08 0a 4e 5a 92 87 1e 8d .`.L......NZ....
0040 92 de 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f ..HTTP/1.1 200 O
0050 4b 0d 0a 53 65 72 76 65 72 3a 20 53 75 6e 2d 4f K..Server: Sun-O
0060 4e 45 2d 57 65 62 2d 53 65 72 76 65 72 2f 36 2e NE-Web-Server/6.
0070 31 0d 0a 44 61 74 65 3a 20 4d 6f 6e 2c 20 32 38 1..Date: Mon, 28
0080 20 4a 75 6e 20 32 30 31 30 20 31 35 3a 33 37 3a Jun 2010 15:37:
0090 32 30 20 47 4d 54 0d 0a 43 61 63 68 65 2d 63 6f 20 GMT..Cache-co
00a0 6e 74 72 6f 6c 3a 20 70 75 62 6c 69 63 2c 70 72 ntrol: public,pr
00b0 69 76 61 74 65 0d 0a 45 54 61 67 3a 20 57 2f 22 ivate..ETag: W/"
00c0 32 32 30 39 38 2d 31 32 37 37 33 30 31 39 38 34 22098-1277301984
00d0 30 30 30 22 0d 0a 4c 61 73 74 2d 4d 6f 64 69 66 000"..Last-Modif
00e0 69 65 64 3a 20 57 65 64 2c 20 32 33 20 4a 75 6e ied: Wed, 23 Jun
00f0 20 32 30 31 30 20 31 34 3a 30 36 3a 32 34 20 47 2010 14:06:24 G
0100 4d 54 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 MT..Content-Type
0110 3a 20 74 65 78 74 2f 63 73 73 0d 0a 43 6f 6e 74 : text/css..Cont
0120 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 32 30 39 ent-Length: 2209
0130 38 0d 0a 54 72 61 6e 73 66 65 72 2d 65 6e 63 6f 8..Transfer-enco
0140 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 0d ding: chunked...
0150 0a 31 66 66 38 0d 0a 40 43 48 41 52 53 45 54 20 .1ff8.. at CHARSET
0160 22 55 54 46 2d 38 22 3b 23 74 70 63 72 7b 62 61 "UTF-8";#tpcr{ba
0170 63 6b 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a 57 ckground-color:W
0180 68 69 74 65 3b 6d 61 72 67 69 6e 3a 31 30 70 78 hite;margin:10px
0190 20 30 20 32 30 70 78 20 30 3b 7d 0a 23 74 70 63 0 20px 0;}.#tpc
01a0 72 20 68 33 7b 66 6f 6e 74 2d 73 69 7a 65 3a 32 r h3{font-size:2
01b0 36 70 78 3b 6d 61 72 67 69 6e 2d 62 6f 74 74 6f 6px;margin-botto
01c0 6d 3a 32 30 70 78 3b 66 6f 6e 74 2d 77 65 69 67 m:20px;font-weig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100628/c4c2cdf6/attachment-0003.html>
More information about the varnish-dev
mailing list