From kristian at varnish-software.com Sun Aug 1 14:45:39 2010 From: kristian at varnish-software.com (=?UTF-8?Q?Kristian_Lyngst=C3=B8l?=) Date: Sun, 1 Aug 2010 16:45:39 +0200 Subject: DNS director committed Message-ID: Greetings, I just committed the DNS director to trunk, even though I know there are some outstanding issues. Trying to keep up with trunk without committing to it (and without a distributed vcs) was proving rather time consuming (and a bit of a motivational killer). Excluding any internal issues, there are three concerns I have with regards to the DNS director: 1. The .list stuff requires access to some Emit* vcc-code. I've currently cheated by just removing the static keyword and adding a local prototype. This is obviously not a good long-term approach. I did it like this for the simple reason that it works and I didn't see a better way of doing it. 2. I added a vdi_get_backend_if_simple(), with appropriate comments. This simply returns the backend of a simple director, so the DNS director can compare DNS results with the IP. It's non-intrusive, but badly named. Because there was also some discussion on whether it was even the Right Thing To Do, I didn't add it to any header files yet. It's a "let's throw it out there and see if it catches fire" sort of thing. 3. Regression tests. It currently passes all tests, but how to go about testing the DNS director automatically? It does, after all, rely on DNS. The only thing I can come up with is 'localhost' vs failure. Other than that, I've still got a list from our last IRC conversation to work on. But it will be much simpler if I can work directly against trunk instead of fighting with a VCS^2 system and trying to stay in sync. Feel free to suggest a different way to work, if you'd rather I waited. But I got the impression that it was up to me. Oh, I also have a return(refresh) patch, which I want to merge. You've already seen the basic patch, but I've now worked out the problems with regards to getting rid of the old content. It's pretty clean. I'll push that in if I don't hear any loud complaints. It's already available from my github varnish repo[1], which I will stop using - or use far less - if I'm able to work directly against trunk instead. [1] http://github.com/KristianLyng/varnish Regards, Kristian From paul.mansfield at taptu.com Wed Aug 4 15:11:58 2010 From: paul.mansfield at taptu.com (Paul Mansfield) Date: Wed, 04 Aug 2010 16:11:58 +0100 Subject: making varnish listen ONLY on ipv6 Message-ID: <4C59833E.7030406@taptu.com> I've fiddled with the -a option to see if it will accept an ipv6 address to force binding only on ipv6, but varnishd didn't like it Is there a way to do this? I am testing out various ideas to see how well a pure ipv6 solution works, so that I can verify my ipv6 test system is working (e.g. DNS entries with only AAAA records etc). thanks very much Paul From phk at phk.freebsd.dk Wed Aug 4 15:17:38 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Wed, 04 Aug 2010 15:17:38 +0000 Subject: making varnish listen ONLY on ipv6 In-Reply-To: Your message of "Wed, 04 Aug 2010 16:11:58 +0100." <4C59833E.7030406@taptu.com> Message-ID: <33913.1280935058@critter.freebsd.dk> In message <4C59833E.7030406 at taptu.com>, Paul Mansfield writes: >I've fiddled with the -a option to see if it will accept an ipv6 address >to force binding only on ipv6, but varnishd didn't like it That should work, how do you specify the address ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From paul.mansfield at taptu.com Wed Aug 4 17:09:54 2010 From: paul.mansfield at taptu.com (Paul Mansfield) Date: Wed, 04 Aug 2010 18:09:54 +0100 Subject: making varnish listen ONLY on ipv6 In-Reply-To: <33913.1280935058@critter.freebsd.dk> References: <33913.1280935058@critter.freebsd.dk> Message-ID: <4C599EE2.7080405@taptu.com> On 04/08/10 16:17, Poul-Henning Kamp wrote: > In message <4C59833E.7030406 at taptu.com>, Paul Mansfield writes: >> I've fiddled with the -a option to see if it will accept an ipv6 address >> to force binding only on ipv6, but varnishd didn't like it > That should work, how do you specify the address ? here's a snippet from the /etc/defaults/varnish file (ubuntu linux) #DAEMON_OPTS="-a :8080 \ DAEMON_OPTS="-a 2001:4d48:2400:0:NNN:NNNN:NNNN:NNN:8080 \ -T localhost:8082 \ -f /etc/varnish/default.vcl \ -S /etc/varnish/secret \ -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G" where NNN substitutes for the real host IP From phk at phk.freebsd.dk Thu Aug 5 06:25:19 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 05 Aug 2010 06:25:19 +0000 Subject: making varnish listen ONLY on ipv6 In-Reply-To: Your message of "Wed, 04 Aug 2010 18:09:54 +0100." <4C599EE2.7080405@taptu.com> Message-ID: <36985.1280989519@critter.freebsd.dk> In message <4C599EE2.7080405 at taptu.com>, Paul Mansfield writes: >On 04/08/10 16:17, Poul-Henning Kamp wrote: >#DAEMON_OPTS="-a :8080 \ >DAEMON_OPTS="-a 2001:4d48:2400:0:NNN:NNNN:NNNN:NNN:8080 \ I belive the convention we support is [...]:port, ie: >DAEMON_OPTS="-a '[2001:4d48:2400:0:NNN:NNNN:NNNN:NNN]:8080' \ Try that... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From paul.mansfield at taptu.com Thu Aug 5 09:11:32 2010 From: paul.mansfield at taptu.com (Paul Mansfield) Date: Thu, 05 Aug 2010 10:11:32 +0100 Subject: making varnish listen ONLY on ipv6 In-Reply-To: <36985.1280989519@critter.freebsd.dk> References: <36985.1280989519@critter.freebsd.dk> Message-ID: <4C5A8044.204@taptu.com> On 05/08/10 07:25, Poul-Henning Kamp wrote: > In message <4C599EE2.7080405 at taptu.com>, Paul Mansfield writes: >> On 04/08/10 16:17, Poul-Henning Kamp wrote: > >> #DAEMON_OPTS="-a :8080 \ >> DAEMON_OPTS="-a 2001:4d48:2400:0:NNN:NNNN:NNNN:NNN:8080 \ > > I belive the convention we support is [...]:port, ie: > >> DAEMON_OPTS="-a '[2001:4d48:2400:0:NNN:NNNN:NNNN:NNN]:8080' \ > > Try that... brilliant, worked no problem. is it worth adding this information to http://varnish-cache.org/docs/tutorial/starting_varnish/ in fact, documenting all the startup options would be useful I could easily find any documentation on the wiki either thanks very much Paul From joec1502 at gmail.com Fri Aug 6 22:50:09 2010 From: joec1502 at gmail.com (Joe Chen) Date: Fri, 6 Aug 2010 16:50:09 -0600 Subject: Complex Backend Selection through VCL? Message-ID: Would someone here help me with using VCL for a complex situation with Varnish? I was ask to configure Varnish within using VCL to do a very dynamic backend selection process, but unable to achieve that. The task I was given is: 1. Using VCL to have a list of 3 backend address: m.com s01.com s02.com 2. Configure Varnish so that: a. it relays each of incoming GET requests to the master backend (m.com, in this case), and the master backend (m.com) will always respond with a status 302 for redirect. b. for each of fetched 302 from master backend, Varnish will check the http header and to select a corresponding slave backend from the the list( either s01.com or s02.com), and restart the fetch to let Varnish fetch the request from the slave backend. I have tried to construct a VCL (included at the bottom) but I am unable to make Varnish work the exactly as described above. FYI, I am using Varnish 2.1.3. Any help would appreciated very much, --Joe backend b_m { .host = "m.com"; .port = "80"; } backend b1 { .host = "s01.com"; .port = "80"; } backend b2 { .host = "s02.com"; .port = "80"; } sub vcl_recv { if (!(req.url ~ "(.*s0.*)") && req.url ~ "(.*e\.html)") { set req.backend = b_m; set req.http.host = "m.com"; } } sub vcl_fetch { if (beresp.status == 302) { if (beresp.http.location ~ "(.*s01.*)" ) { set req.backend = b1; set req.url = beresp.http.location; set req.http.host = "s01.a.com"; } else if (beresp.http.location ~ "(.*s02.*)" ) { set req.backend = b2; set req.url = beresp.http.location; set req.http.host = "s02.com"; } } restart; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdzstz at gmail.com Sat Aug 7 23:21:12 2010 From: jdzstz at gmail.com (=?ISO-8859-1?Q?Jorge_D=EDaz?=) Date: Sun, 8 Aug 2010 01:21:12 +0200 Subject: [Varnish] #736: Migration to Cygwin plataform In-Reply-To: <051.1f23c665fb9f10a3a8226647e4304107@varnish-cache.org> References: <042.6ef2981e8cf7eb068adf1551551220f4@varnish-cache.org> <051.1f23c665fb9f10a3a8226647e4304107@varnish-cache.org> Message-ID: Hello, About my modifications for Cygwin support, I will prepare all modifications in patches format instead complete files. I will send you the patch at the end of August (before it is impossible to me) But I need some help in order to solve the problems: * Regression Tests: * I have problems with 8 of 183 tests there are two kind of problems: - "bind(): Address already in use" - "Test timed out" Do you know if some platform have similar problems or some common cause of this errors? I have executed same regression tests in Solaris 10, and the results are worse than Cygwin, Solaris has "20 of 183 tests failed" so if Solaris is level "B - Platforms we try not to break" we can consider Cygwin at its same level? or errors must be zero in order to add my modifications to subversion?? *Autoconf tools (aka autocrap): * I am a newbie in autoconf world. I was able to make almost all modifications in configure.ac but I need some manual changes in Makefile.am: - Only for libraries, we need to add "-no-undefined" parameter in LDFLAGS - Only for varnishd, we need to add "-Wl,-out-implib,libvarnishd.dll.a" in LDFLAGS this changes only apply to Cygwin. - In Cygwin, the libraries "libvcl" and "libvarnishapi" have a new compilation-time dependence with libvarnish, I have to add LIBS=-lvarnish and LDFLAGS='-L$(top_builddir)/lib/libvarnish only for libvcl and libvarnishapi. - If platform is not cygwin, we do not add anything. I have apply the modifications defining some variables that in Cygwin have some value and in other platforms are blank. This variables are used in the specific Makefile.am. There is other way to apply modifications without changing the five Makefile.am and only changing configure.ac ??? *Other questions:* Do you want me to reopen ticket #736 with changes or I must create a new ticket? About "supported platform" in varnish I think there is no page in wiki ( http://varnish-cache.org/wiki) that speaks about diferences between Linux, FreeBSD, Solaris and MacOSX support. Maybe the only page about platforms is: http://varnish-cache.org/wiki/Installation but only speaks about installation issues. In the future it will be necessary to add Cygwin at this page and speak about some debugging tricks of this platform (strace command or CYGWIN enviroment variable) Thank you, Jorge 2010/8/4 Varnish > #736: Migration to Cygwin plataform > > ----------------------+----------------------------------------------------- > Reporter: jdzst | Type: enhancement > Status: closed | Priority: normal > Milestone: | Component: build > Version: | Severity: normal > Resolution: invalid | Keywords: cygwin, windows > > ----------------------+----------------------------------------------------- > Changes (by phk): > > * status: new => closed > * resolution: => invalid > > > Comment: > > Your ticket and work with cygwin caused me to ponder what we mean by > "supported platform" in Varnish, and I wrote up my thoughts yesterday: > > http://varnish-cache.org/browser/trunk/varnish- > cache/doc/sphinx/phk/platforms.rst > > CYGWIN is a Tier C platform, one we are willing to tolerate, if it does > not cost us too much effort. > > These changes do not look terribly intrusive. (I don't understand why you > have to modify all the Makefile.am to add cygwin specific LD-flags, I > thought autocrap did that for you ?) > > On the other hand, you don't seem to have managed to get much > functionality out of it yet, given that some of those failing tests are > very basic functionality. > > But keep at it, send us patches instead of complete files, once you get > the test-cases to work, and we will give you a fair reading. > > For now I will close this ticket. > > -- > Ticket URL: > Varnish > The Varnish HTTP Accelerator > -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.millar at physics.gla.ac.uk Sun Aug 8 21:50:50 2010 From: p.millar at physics.gla.ac.uk (Paul Millar) Date: Sun, 8 Aug 2010 23:50:50 +0200 Subject: Hiding 302 replies from clients Message-ID: <201008082350.51015.p.millar@physics.gla.ac.uk> Hi all, I've a question about whether something is possible with Varnish. Suppose the back-end replies with a 302 return code ("Found" or "Moved temporarily"). From a quick test, it seems that Varnish will relay this 302 reply back to the client. The client will extract the new URL from the "Location" header field and make a second request. [aside: from a quick test, it seems that varnish always caches the 302 reply from the back-end. It will give the same reply if a client asks for the same URL, even when the back-end reply omits any "Cache-Control" or "Expires" header. If this is so then it's a bug.] What I'd like to happen is that, when receiving a 302 reply from the back-end, Varnish would attempt to fetch the data from the redirect URL (given in the "Location" header). Assuming the data is accessible from this URL then the client would obtain the data without being redirected. Is it possible to configure varnish to do this? In case you're wondering, here's why... Simplifying the setup somewhat, consider a distributed http service where a central server that knows about all the files but hosts none of the data. When a client requests a file, the central server redirects the client to whichever server is currently hosting that file by replying with a 302 reply. The client can read that file from the hosting server with the URL in the "Location" header. The redirect URL ("Location" header) is a single-use URL: subsequent attempts to use that URL will fail. Requests from the central server will generate a new single-use URL. Since 302 requests are non-cachable by default and conforming clients should make subsequent requests to the central server, this works. However, it does make caching awkward. The stored data does not change, so could be cached. However, if the client sees the redirect then the data would be cached against the single-use URLs, and subsequent requests for the same data wouldn't use the cached copy. Cheers, Paul. From sky at crucially.net Mon Aug 9 05:13:47 2010 From: sky at crucially.net (Artur Bergman) Date: Sun, 8 Aug 2010 22:13:47 -0700 Subject: Hiding 302 replies from clients In-Reply-To: <201008082350.51015.p.millar@physics.gla.ac.uk> References: <201008082350.51015.p.millar@physics.gla.ac.uk> Message-ID: <0D9E25F9-0847-44C5-A398-0FF0DDEFAEFC@crucially.net> if(bereq.status == 302) { set req.url = bereq.http.Location; restart; } Would this work? On Aug 8, 2010, at 2:50 PM, Paul Millar wrote: > Hi all, > > I've a question about whether something is possible with Varnish. > > Suppose the back-end replies with a 302 return code ("Found" or "Moved > temporarily"). From a quick test, it seems that Varnish will relay > this 302 > reply back to the client. The client will extract the new URL from > the > "Location" header field and make a second request. > > [aside: from a quick test, it seems that varnish always caches the > 302 reply > from the back-end. It will give the same reply if a client asks for > the same > URL, even when the back-end reply omits any "Cache-Control" or > "Expires" > header. If this is so then it's a bug.] > > What I'd like to happen is that, when receiving a 302 reply from the > back-end, > Varnish would attempt to fetch the data from the redirect URL (given > in the > "Location" header). Assuming the data is accessible from this URL > then the > client would obtain the data without being redirected. > > Is it possible to configure varnish to do this? > > In case you're wondering, here's why... Simplifying the setup > somewhat, > consider a distributed http service where a central server that > knows about > all the files but hosts none of the data. When a client requests a > file, the > central server redirects the client to whichever server is currently > hosting > that file by replying with a 302 reply. The client can read that > file from the > hosting server with the URL in the "Location" header. > > The redirect URL ("Location" header) is a single-use URL: subsequent > attempts > to use that URL will fail. Requests from the central server will > generate a > new single-use URL. Since 302 requests are non-cachable by default > and > conforming clients should make subsequent requests to the central > server, this > works. > > However, it does make caching awkward. The stored data does not > change, so > could be cached. However, if the client sees the redirect then the > data would > be cached against the single-use URLs, and subsequent requests for > the same > data wouldn't use the cached copy. > > Cheers, > > Paul. > > > _______________________________________________ > varnish-dev mailing list > varnish-dev at varnish-cache.org > http://lists.varnish-cache.org/mailman/listinfo/varnish-dev From tfheen at varnish-software.com Tue Aug 10 08:35:52 2010 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Tue, 10 Aug 2010 10:35:52 +0200 Subject: DNS director committed In-Reply-To: ("Kristian =?utf-8?Q?Lyngst=C3=B8l=22's?= message of "Sun, 1 Aug 2010 16:45:39 +0200") References: Message-ID: <87pqxqj253.fsf@qurzaw.linpro.no> ]] Kristian Lyngst?l | 3. Regression tests. It currently passes all tests, but how to go | about testing the DNS director automatically? It does, after all, rely | on DNS. The only thing I can come up with is 'localhost' vs failure. At least exercising the VCC functions sounds doable, even if we can't reasonably test the rest of it? -- Tollef Fog Heen Varnish Software t: +47 21 54 41 73 From kristian at varnish-software.com Tue Aug 10 12:20:23 2010 From: kristian at varnish-software.com (=?UTF-8?Q?Kristian_Lyngst=C3=B8l?=) Date: Tue, 10 Aug 2010 14:20:23 +0200 Subject: req.hash_control_* variables Message-ID: Hey Martin (and -dev) The idea we want to implement is for varnish to be able to do controlled cache misses to update the content, and allow Varnish to ignore busy-objects in a controlled (through VCL) manner. The features are only marginally different. I already implemented return(refresh), but have backed it out again, because we've decided to go for a more generalized approach and use a variable instead of a return type. I attached the patch as a reference. If nothing else, it should give you a vague idea. The use case for ignoring the busy object is to avoid a race when you have two Varnish servers asking each other for data when the client isn't the other Varnish server. IE: Time Action 1. client->v1 GET /foo 1. client->v2 GET /foo 2. v1->v2 GET /foo 2. v2->v1 GET /foo 3 v2: Already fetching /foo (from v1). Wait for it. 3. v1: Already fetching /foo (from v2). Wait for it. So far, the naming suggestion is a req.hash_control_always_miss = {0,1} and req.hash_control_ignore_busy = {0,1}. We did discuss briefly if we should have a general bitmap or not, but I think we ended up going for a uint8_t for each of them instead for now. For VCL, a snippet from vcl_fetch might look like: if (client.ip ~ varnish1) { set req.hash_control_ignore_busy = 1; } or: if (client.ip ~ purgeservice && req.http.X-purge == "true") { set req.hash_control_always_miss = 1; } I'll go through VCL in more detail with you and Yves tomorrow, so you'll have at least a few minutes between VCL 101 and coding it ;) So take a shot if it seems attainable and interesting. - Kristian PS: I CC'ed varnish-dev, as there is no reason not to. I'm going to default to cc'ing -dev for everything related to development. From kristian at varnish-software.com Tue Aug 10 12:32:48 2010 From: kristian at varnish-software.com (=?UTF-8?Q?Kristian_Lyngst=C3=B8l?=) Date: Tue, 10 Aug 2010 14:32:48 +0200 Subject: req.hash_control_* variables In-Reply-To: References: Message-ID: On Tue, Aug 10, 2010 at 2:20 PM, Kristian Lyngst?l wrote: > I attached the patch as a reference. If nothing else, it should give you a vague idea. No I didn't. But I did now. You mostly want the snippets of cache_hash.c. - Kristian -------------- next part -------------- A non-text attachment was scrubbed... Name: return-refresh.patch Type: text/x-diff Size: 4717 bytes Desc: not available URL: From phk at phk.freebsd.dk Tue Aug 10 15:11:04 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 10 Aug 2010 15:11:04 +0000 Subject: req.hash_control_* variables In-Reply-To: Your message of "Tue, 10 Aug 2010 14:20:23 +0200." Message-ID: <10920.1281453064@critter.freebsd.dk> In message , =?UT F-8?Q?Kristian_Lyngst=C3=B8l?= writes: >So far, the naming suggestion is a req.hash_control_always_miss = Isn't that a bit long-winded ? I would probably go with just req.hash_always_miss -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From kristian at varnish-software.com Tue Aug 10 15:39:19 2010 From: kristian at varnish-software.com (=?UTF-8?Q?Kristian_Lyngst=C3=B8l?=) Date: Tue, 10 Aug 2010 17:39:19 +0200 Subject: req.hash_control_* variables In-Reply-To: <10920.1281453064@critter.freebsd.dk> References: <10920.1281453064@critter.freebsd.dk> Message-ID: On Tue, Aug 10, 2010 at 5:11 PM, Poul-Henning Kamp wrote: > In message , =?UT > F-8?Q?Kristian_Lyngst=C3=B8l?= writes: > >>So far, the naming suggestion is a req.hash_control_always_miss = > > Isn't that a bit long-winded ? > > I would probably go with just req.hash_always_miss True. req.hash_always_miss works for me. I was about to grab my paint brush and get to work on that bike shed, but I figure I'll just leave it at req.hash_always_miss and not suggest req.always_miss. (oops, guess I did it anyway) - Kristian, running out of the office From t_pascal at zennet.com Wed Aug 11 18:11:32 2010 From: t_pascal at zennet.com (T. Pascal) Date: Wed, 11 Aug 2010 11:11:32 -0700 Subject: Check body length in VCL Message-ID: It is sometimes useful to use the following rule to make decisions in VCL, based on Content-Length: vcl_fetch() { # Cache objects larger than 3000 bytes if ((beresp.status == 200) && (beresp.http.Content-Length ~ "^([3-9]|\d\d)\d\d\d")) { set beresp.ttl = 10d; } else { set beresp.ttl = 10m; } } The use case is an XML feed that we heuristically know is "well formed" if it's more then 3K; if the response is shorter, it often means the result set was empty for whatever reason (even if it's an HTTP-200 response), so we cache the short requests for a small time until the full result is ready and then cache it for a long time. This is a horrible hack that works fine, until we get some chunked responses and the above regexp fails. So I would prefer: if ((beresp.status == 200) && (length(body) > 3000)) { # Cache a long time } Does this exist without in-line C, is it a valuable feature, etc. so forth? -T. -------------- next part -------------- An HTML attachment was scrubbed... URL: From t_pascal at zennet.com Wed Aug 11 18:26:35 2010 From: t_pascal at zennet.com (T. Pascal) Date: Wed, 11 Aug 2010 11:26:35 -0700 Subject: Hiding 302 replies from clients Message-ID: > Suppose the back-end replies with a 302 return code ("Found" or "Moved > temporarily"). From a quick test, it seems that Varnish will relay this 302 > reply back to the client. The client will extract the new URL from the > "Location" header field and make a second request. > This works: for us (we normalise the + and space to %20; you can use any other normalisation you need to ensure the hash-key is the same): vcl_fetch() { if ((beresp.status == 301) || (beresp.status == 302)) { # Try again at the new location (normalise + and space to %20) # and strip the leading http://host/ part set req.url = regsub(req.url,".*",regsuball(regsub(beresp.http.Location,"^http://[^/]+(.*)","\1"),"[ +]","%2520")); restart; } } You also have to use some URL parsing to map to different backends which we use. > [aside: from a quick test, it seems that varnish always caches the 302 reply > from the back-end. It will give the same reply if a client asks for the same > URL, even when the back-end reply omits any "Cache-Control" or "Expires" > header. If this is so then it's a bug.] > I'm not an expert on the RFC by any means, but it is permissible to cache 302 (temporary) for a reasonable timeframe and 301 for a long timeframe. I have verified that if you specifically use no-cache in your headers that varnish will not cache the 302. Not sure about 301; I think it is semantically correct to ignore cache headers and keep a 301 "indefinitely" (otherwise don't use a 301!). > In case you're wondering, here's why... Simplifying the setup somewhat, > consider a distributed http service where a central server that knows about > all the files but hosts none of the data. When a client requests a file, the > central server redirects the client to whichever server is currently hosting > that file by replying with a 302 reply. The client can read that file from the > hosting server with the URL in the "Location" header. > Caching the 302 is fast, and allowing the client to follow to the Location:, and then caching THAT response from the other backend is perfectly fast and not really a reason to hide the 302. In fact, if your client supports following the Location header (which it should) I don't recommend tampering with it at all. The only reason I implemented the above solution is because our "client" is broken and couldn't follow 301/302 for us. -T. From t_pascal at zennet.com Wed Aug 11 18:46:08 2010 From: t_pascal at zennet.com (T. Pascal) Date: Wed, 11 Aug 2010 11:46:08 -0700 Subject: Complex Backend Selection through VCL? Message-ID: >Would someone here help me with using VCL for a complex situation with >Varnish? > >sub vcl_fetch { > if (beresp.status == 302) { > if (beresp.http.location ~ "(.*s01.*)" ) { > set req.backend = b1; > set req.url = beresp.http.location; > set req.http.host = "s01.a.com"; > } > else if (beresp.http.location ~ "(.*s02.*)" ) { > set req.backend = b2; > set req.url = beresp.http.location; > set req.http.host = "s02.com"; > } > } > > restart; >} > I think your "restart" is in too broad a scope (vcl_fetch is restarting on each request?) sub vcl_fetch { if (beresp.status == 302) { if (beresp.http.location ~ "(.*s01.*)" ) { set req.backend = b1; set req.url = beresp.http.location; set req.http.host = "s01.a.com"; } else if (beresp.http.location ~ "(.*s02.*)" ) { set req.backend = b2; set req.url = beresp.http.location; set req.http.host = "s02.com"; } restart; } } -T. From phk at phk.freebsd.dk Wed Aug 11 20:40:57 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Wed, 11 Aug 2010 20:40:57 +0000 Subject: Check body length in VCL In-Reply-To: Your message of "Wed, 11 Aug 2010 11:11:32 MST." Message-ID: <22526.1281559257@critter.freebsd.dk> In message , "T. Pascal" writes: >if ((beresp.status == 200) && (length(body) > 3000)) { The trouble is that vcl_fetch is called before the body is fetched from the backend, so we cannot know the length, if the transfer method is EOF or chunked... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From t_pascal at zennet.com Wed Aug 11 21:27:27 2010 From: t_pascal at zennet.com (T. Pascal) Date: Wed, 11 Aug 2010 14:27:27 -0700 Subject: req.hash not a string (when?) Message-ID: Trying to look at the hash string can be useful for debugging, especially if there are huge, ugly regsub going on: Message from VCC-compiler: String representation of 'req.hash' not implemented yet. (input Line -- Pos 50) set req.http.X-Varnish-HashKey = req.hash; -------------------------------------------------########- Running VCC-compiler failed, exit 1 Current workaround is to repeat the ugly, unmaintainable code twice: set req.hash += regsub(regsub(regsub(req.url, "^([/]xxx[?])[^&]*[&]?(q=[^&]*).*$", "\1\2"),"(%2520| |\+)+xxs:.*$",""),"(%2520| |\+)+-xxx.*$",""); set req.http.X-Varnish-HashKey = regsub(regsub(regsub(req.url, "^([/]xxx[?])[^&]*[&]?(q=[^&]*).*$", "\1\2"),"(%2520| |\+)+xxx:.*$",""),"(%2520| |\+)+-xxx.*$",""); Just wondering when/if req.hash can be used like the above error (or, with the new "log" feature)? -T. From phk at phk.freebsd.dk Wed Aug 11 21:31:37 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Wed, 11 Aug 2010 21:31:37 +0000 Subject: req.hash not a string (when?) In-Reply-To: Your message of "Wed, 11 Aug 2010 14:27:27 MST." Message-ID: <42516.1281562297@critter.freebsd.dk> In message , "T. Pascal" writes: >Just wondering when/if req.hash can be used like the above error (or, >with the new "log" feature)? req.hash is not coming back as a readable variable, it is too expensive in storage. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From t_pascal at zennet.com Wed Aug 11 21:41:04 2010 From: t_pascal at zennet.com (T. Pascal) Date: Wed, 11 Aug 2010 14:41:04 -0700 Subject: Check body length in VCL In-Reply-To: <22526.1281559257@critter.freebsd.dk> References: <22526.1281559257@critter.freebsd.dk> Message-ID: On Wed, Aug 11, 2010 at 1:40 PM, Poul-Henning Kamp wrote: > In message , "T. > Pascal" writes: > >>if ((beresp.status == 200) && (length(body) > 3000)) { > > The trouble is that vcl_fetch is called before the body is fetched > from the backend, so we cannot know the length, if the transfer > method is EOF or chunked... > I suppose that I intuited as much and so I cast around a bit to think that maybe the body is available: sub vcl_deliver { if ((resp.status == 200) && (resp.http.Content-Length ~ "\d{5}")) { set obj.ttl = 10d; } } Of course, my luck ended there: Message from VCC-compiler: Variable 'obj.ttl' not accessible in method 'vcl_deliver'. At: (input Line --- Pos 21) set obj.ttl = 10d; --------------------#######------- Running VCC-compiler failed, exit 1 I suppose it is a vicious circle that "the body is not available when we can update the ttl" and "the ttl cannot be updated when the body is available". There might be a use case to update the TTL at times other than vcl_fetch? Why not be able to update the TTL when we deliver content (thus creating a sort of MRU)? -T. From t_pascal at zennet.com Wed Aug 11 21:48:25 2010 From: t_pascal at zennet.com (T. Pascal) Date: Wed, 11 Aug 2010 14:48:25 -0700 Subject: req.hash not a string (when?) In-Reply-To: <42516.1281562297@critter.freebsd.dk> References: <42516.1281562297@critter.freebsd.dk> Message-ID: On Wed, Aug 11, 2010 at 2:31 PM, Poul-Henning Kamp wrote: > In message , "T. > Pascal" writes: > >>Just wondering when/if req.hash can be used like the above error (or, >>with the new "log" feature)? > > req.hash is not coming back as a readable variable, it is too expensive > in storage. > I can appreciate that; wondering if it can be emitted in varnishlog; currently you only see this: 26 VCL_call c hash 26 VCL_return c hash Something a little more might be a nice transparency. Until then the workaround is in place, commented out when not required. :) -T. From phk at phk.freebsd.dk Thu Aug 12 06:24:25 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 12 Aug 2010 06:24:25 +0000 Subject: req.hash not a string (when?) In-Reply-To: Your message of "Wed, 11 Aug 2010 14:48:25 MST." Message-ID: <44082.1281594265@critter.freebsd.dk> In message , "T. Pascal" writes: >On Wed, Aug 11, 2010 at 2:31 PM, Poul-Henning Kamp wrote: >> In message , "T. >> Pascal" writes: >> >>>Just wondering when/if req.hash can be used like the above error (or, >>>with the new "log" feature)? >> >> req.hash is not coming back as a readable variable, it is too expensive >> in storage. >> >I can appreciate that; wondering if it can be emitted in varnishlog; >currently you only see this: There's already a parameter for that: log_hashstring -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From wijet at me.com Fri Aug 13 10:31:41 2010 From: wijet at me.com (Mariusz Pietrzyk) Date: Fri, 13 Aug 2010 12:31:41 +0200 Subject: Problem with enabling streaming Message-ID: Hi all, I have a problem with enabling streaming in varnish. Some of applications use streaming for few URLs. My idea is to set special header in application response, like Streaming='on'. Then, in vcl_fetch depends on that header decide if response should be streamed or not. The problem is that "pipe" is not available in vcl_fetch. Using "pass" makes varnish wait for whole response (which I obviously want to avoid). The only way I found is to use custom param in URL, like /users.csv?streaming='on' and pipe in vcl_recv. However than is not very elegant and makes problems on application side. Is there any way around it ? and use "pipe" in vcl_fetch or something else to enable streaming based on backend response? -- Regards Mariusz Pietrzyk http://wijet.pl From perbu at varnish-software.com Fri Aug 13 11:02:03 2010 From: perbu at varnish-software.com (Per Buer) Date: Fri, 13 Aug 2010 13:02:03 +0200 Subject: Problem with enabling streaming In-Reply-To: References: Message-ID: On Fri, Aug 13, 2010 at 12:31 PM, Mariusz Pietrzyk wrote: Is there any way around it ? and use "pipe" in vcl_fetch or something else > to enable streaming based on backend response? > You could probably modify the request object, restart and then pick up the change in vcl_recv. Not ideal, but it should work. -- Per Buer, Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer -------------- next part -------------- An HTML attachment was scrubbed... URL: From wijet at me.com Fri Aug 13 13:02:02 2010 From: wijet at me.com (Mariusz Pietrzyk) Date: Fri, 13 Aug 2010 15:02:02 +0200 Subject: Problem with enabling streaming In-Reply-To: References: Message-ID: <10CDB062-4D79-4982-ACBC-D025007EE5B3@me.com> Hi, On 2010-08-13, at 13:02, Per Buer wrote: > On Fri, Aug 13, 2010 at 12:31 PM, Mariusz Pietrzyk wrote: > > Is there any way around it ? and use "pipe" in vcl_fetch or something else to enable streaming based on backend response? > > You could probably modify the request object, restart and then pick up the change in vcl_recv. Not ideal, but it should work. Where I should do that ? I don't know which request should be streamed till I get whole response from backend in vcl_fetch. -- Regards Mariusz Pietrzyk http://wijet.pl -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Sat Aug 14 09:38:39 2010 From: perbu at varnish-software.com (Per Buer) Date: Sat, 14 Aug 2010 11:38:39 +0200 Subject: Problem with enabling streaming In-Reply-To: <10CDB062-4D79-4982-ACBC-D025007EE5B3@me.com> References: <10CDB062-4D79-4982-ACBC-D025007EE5B3@me.com> Message-ID: On Fri, Aug 13, 2010 at 3:02 PM, Mariusz Pietrzyk wrote: > Hi, > > On 2010-08-13, at 13:02, Per Buer wrote: > > On Fri, Aug 13, 2010 at 12:31 PM, Mariusz Pietrzyk wrote: > > Is there any way around it ? and use "pipe" in vcl_fetch or something else >> to enable streaming based on backend response? >> > > You could probably modify the request object, restart and then pick up the > change in vcl_recv. Not ideal, but it should work. > > > Where I should do that ? > > I don't know which request should be streamed till I get whole response > from backend in vcl_fetch. > In vcl_fetch you'll have the headers, not the object itself. I think you should modify the req object in vcl_fetch and add a X-pipe: header. The restart the transaction. In vcl_recv you test for the named header and call pipe. I'm not entirely sure how Varnish will handle a switch from pass to pipe in the middle of a restart, but it should be easy to test. -- Per Buer, Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer -------------- next part -------------- An HTML attachment was scrubbed... URL: From t_pascal at zennet.com Tue Aug 17 00:00:21 2010 From: t_pascal at zennet.com (T. Pascal) Date: Mon, 16 Aug 2010 17:00:21 -0700 Subject: req.hash not a string (when?) In-Reply-To: <44082.1281594265@critter.freebsd.dk> References: <44082.1281594265@critter.freebsd.dk> Message-ID: On Wed, Aug 11, 2010 at 11:24 PM, Poul-Henning Kamp wrote: > In message , "T. > Pascal" writes: >>On Wed, Aug 11, 2010 at 2:31 PM, Poul-Henning Kamp wrote: >>> In message , "T. >>> Pascal" writes: >>> >>>>Just wondering when/if req.hash can be used like the above error (or, >>>>with the new "log" feature)? >>> >>> req.hash is not coming back as a readable variable, it is too expensive >>> in storage. >>> >>I can appreciate that; wondering if it can be emitted in varnishlog; >>currently you only see this: > > There's already a parameter for that: log_hashstring > Confirmed that works with the "-p log_hashstring on" on startup or "param.set log_hashstring on" in the CLI. The "run-time parameters" part of the documentation was a bit tricky to find, but I suddenly see what the cryptic comments about (for example) "max_restarts" were all about. -T From jdzstz at gmail.com Tue Aug 17 12:43:23 2010 From: jdzstz at gmail.com (=?ISO-8859-1?Q?Jorge_D=EDaz?=) Date: Tue, 17 Aug 2010 14:43:23 +0200 Subject: [Varnish] #736: Migration to Cygwin plataform In-Reply-To: References: <042.6ef2981e8cf7eb068adf1551551220f4@varnish-cache.org> <051.1f23c665fb9f10a3a8226647e4304107@varnish-cache.org> Message-ID: I have attached cygwin changes in patch format for r5110. I also have executed regression tests with r5110. I continue having problems with: *FAIL: ./tests/b00004.vtc FAIL: ./tests/b00015.vtc FAIL: ./tests/b00030.vtc FAIL: ./tests/c00005.vtc FAIL: ./tests/p00002.vtc FAIL: ./tests/r00433.vtc FAIL: ./tests/r00558.vtc FAIL: ./tests/v00009.vtc FAIL: ./tests/v00027.vtc* Despite this problems, Varnish seems to work ok in cygwin and it has less regression errors than Solaris platform. About regression errors, test c00005.vtc is not working because IPv6 problems: There is a IPv6 instruction "::" in VCL that it is not supported by Cygwin in Windows XP: acl acl1 { ! "localhost"; "0.0.0.0" / 0; "::" / 0; } **** v1 CLI RX| DNS lookup(::): hostname nor servname provided, or not known\n Cygwin IPv6 might work in Windows Vista (but I don't have any) http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html IPv6 support. New APIs getaddrinfo, getnameinfo, freeaddrinfo, gai_strerror, in6addr_any, in6addr_loopback. On IPv6-less systems, replacement functions are available for IPv4. On systems with IPv6 enabled, the underlying WinSock? functions are used. While I tried hard to get the functionality as POSIXy as possible, keep in mind that a *fully* conformant implementation of getaddrinfo and other stuff is only available starting with Windows Vista/2008. The rest of regression errors have two kind of problems: - bind(): Address already in use - Test timed out I have filled all this information in ticket #736 ( http://varnish-cache.org/ticket/736) 2010/8/8 Jorge D?az > Hello, > > About my modifications for Cygwin support, I will prepare all modifications > in patches format instead complete files. > > I will send you the patch at the end of August (before it is impossible to > me) > > > But I need some help in order to solve the problems: > * > Regression Tests: * > > I have problems with 8 of 183 tests there are two kind of problems: > > - "bind(): Address already in use" > - "Test timed out" > Do you know if some platform have similar problems or some common cause of > this errors? > > I have executed same regression tests in Solaris 10, and the results are > worse than Cygwin, Solaris has "20 of 183 tests failed" so if Solaris is > level "B - Platforms we try not to break" we can consider Cygwin at its same > level? or errors must be zero in order to add my modifications to > subversion?? > > > *Autoconf tools (aka autocrap): * > > I am a newbie in autoconf world. I was able to make almost all > modifications in configure.ac but I need some manual changes in > Makefile.am: > > - Only for libraries, we need to add "-no-undefined" parameter in > LDFLAGS > - Only for varnishd, we need to add "-Wl,-out-implib,libvarnishd.dll.a" > in LDFLAGS this changes only apply to Cygwin. > - In Cygwin, the libraries "libvcl" and "libvarnishapi" have a new > compilation-time dependence with libvarnish, I have to add LIBS=-lvarnish > and LDFLAGS='-L$(top_builddir)/lib/libvarnish only for libvcl and > libvarnishapi. > - If platform is not cygwin, we do not add anything. > > > I have apply the modifications defining some variables that in Cygwin have > some value and in other platforms are blank. This variables are used in the > specific Makefile.am. > > There is other way to apply modifications without changing the five > Makefile.am and only changing configure.ac ??? > > > *Other questions:* > > Do you want me to reopen ticket #736 with changes or I must create a new > ticket? > > About "supported platform" in varnish I think there is no page in wiki ( > http://varnish-cache.org/wiki) that speaks about diferences between Linux, > FreeBSD, Solaris and MacOSX support. > Maybe the only page about platforms is: > http://varnish-cache.org/wiki/Installation but only speaks about > installation issues. In the future it will be necessary to add Cygwin at > this page and speak about some debugging tricks of this platform (strace > command or CYGWIN enviroment variable) > > > > Thank you, > > Jorge > > > > > 2010/8/4 Varnish > > #736: Migration to Cygwin plataform >> >> ----------------------+----------------------------------------------------- >> Reporter: jdzst | Type: enhancement >> Status: closed | Priority: normal >> Milestone: | Component: build >> Version: | Severity: normal >> Resolution: invalid | Keywords: cygwin, windows >> >> ----------------------+----------------------------------------------------- >> Changes (by phk): >> >> * status: new => closed >> * resolution: => invalid >> >> >> Comment: >> >> Your ticket and work with cygwin caused me to ponder what we mean by >> "supported platform" in Varnish, and I wrote up my thoughts yesterday: >> >> http://varnish-cache.org/browser/trunk/varnish- >> cache/doc/sphinx/phk/platforms.rst >> >> CYGWIN is a Tier C platform, one we are willing to tolerate, if it does >> not cost us too much effort. >> >> These changes do not look terribly intrusive. (I don't understand why >> you >> have to modify all the Makefile.am to add cygwin specific LD-flags, I >> thought autocrap did that for you ?) >> >> On the other hand, you don't seem to have managed to get much >> functionality out of it yet, given that some of those failing tests are >> very basic functionality. >> >> But keep at it, send us patches instead of complete files, once you get >> the test-cases to work, and we will give you a fair reading. >> >> For now I will close this ticket. >> >> -- >> Ticket URL: >> Varnish >> The Varnish HTTP Accelerator >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- $ make check make check-TESTS make[1]: Entering directory `/tmp/varnish-cache/bin/varnishtest' # top TEST ././tests/a00000.vtc passed (0.051s) PASS: ./tests/a00000.vtc # top TEST ././tests/a00001.vtc passed (0.030s) PASS: ./tests/a00001.vtc # top TEST ././tests/a00002.vtc passed (0.032s) PASS: ./tests/a00002.vtc # top TEST ././tests/a00003.vtc passed (0.048s) PASS: ./tests/a00003.vtc # top TEST ././tests/a00004.vtc passed (0.441s) PASS: ./tests/a00004.vtc # top TEST ././tests/a00005.vtc passed (0.044s) PASS: ./tests/a00005.vtc # top TEST ././tests/a00006.vtc passed (0.032s) PASS: ./tests/a00006.vtc # top TEST ././tests/a00007.vtc passed (0.036s) PASS: ./tests/a00007.vtc # top TEST ././tests/a00008.vtc passed (1.859s) PASS: ./tests/a00008.vtc # top TEST ././tests/a00009.vtc passed (3.174s) PASS: ./tests/a00009.vtc # top TEST ././tests/a00010.vtc passed (0.041s) PASS: ./tests/a00010.vtc # top TEST ././tests/b00000.vtc passed (4.880s) PASS: ./tests/b00000.vtc # top TEST ././tests/b00001.vtc passed (7.123s) PASS: ./tests/b00001.vtc # top TEST ././tests/b00002.vtc passed (5.552s) PASS: ./tests/b00002.vtc # top TEST ././tests/b00003.vtc passed (5.247s) PASS: ./tests/b00003.vtc **** top macro def tmpdir=/tmp/vtc.6172.0d09da2e **** top macro def bad_ip=10.255.255.255 * top TEST ././tests/b00004.vtc starting *** top test * top TEST Torture Varnish with start/stop commands *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=4306 **** s1 macro def s1_sock=127.0.0.1:4306 * s1 Listen on 127.0.0.1:4306 ** s1 Started on 127.0.0.1:4306 *** top varnish ** v1 Launch *** v1 CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.6172.0d09da2e/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tm p/vtc.6172.0d09da2e/v1/_S -M 127.0.0.1:4307 -P /tmp/vtc.6172.0d09da2e/v1/varnishd.pid -sfile,/tmp/vtc.6172.0d09da2e/v1,10M *** v1 debug| storage_file: filename: /tmp/vtc.6172.0d09da2e/v1/varnish.G4SKf9 size 10 MB.\n *** v1 debug| Platform: CYGWIN_NT-5.1,1.7.6(0.230/5/3),i686,-sfile,-hcritbit\n *** v1 debug| 200 193 \n *** v1 debug| -----------------------------\n *** v1 debug| Varnish HTTP accelerator CLI.\n *** v1 debug| -----------------------------\n *** v1 debug| Type 'help' for command list.\n *** v1 debug| Type 'quit' to close CLI session.\n *** v1 debug| Type 'start' to launch worker process.\n *** v1 debug| \n *** v1 CLI connection fd = 5 *** v1 CLI RX 107 **** v1 CLI RX| aajnxghzwqphcasohclllkhhxkbdkuom\n **** v1 CLI RX| \n **** v1 CLI RX| Authentication required.\n **** v1 CLI TX| auth a9e7214fb4e3375699e1c6deccd649c82b4f32339fdfa3356494af5da502845e\n *** v1 CLI RX 200 **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Varnish HTTP accelerator CLI.\n **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Type 'help' for command list.\n **** v1 CLI RX| Type 'quit' to close CLI session.\n **** v1 CLI RX| Type 'start' to launch worker process.\n **** v1 CLI TX| vcl.inline vcl1 "backend s1 { .host = \"127.0.0.1\"; .port = \"4306\"; }\n " *** v1 CLI RX 200 **** v1 CLI RX| VCL compiled. **** v1 CLI TX| vcl.use vcl1 *** v1 CLI RX 200 *** top varnish ** v1 Start **** v1 CLI TX| start *** v1 debug| child (2396) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 debug| Child (2396) said \n *** v1 debug| Child (2396) said Child starts\n *** v1 debug| Child (2396) said managed to mmap 10485760 bytes of 10485760\n *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 4313\n ** v1 Listen on 127.0.0.1 4313 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=4313 **** v1 macro def v1_sock=127.0.0.1:4313 *** top varnish **** v1 macro undef v1_addr **** v1 macro undef v1_port **** v1 macro undef v1_sock ** v1 Stop **** v1 CLI TX| stop *** v1 CLI RX 200 **** v1 CLI TX| status *** v1 debug| Stopping Child\n *** v1 debug| Child (2396) said Child dies\n *** v1 debug| Child (2396) died\n *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopping *** v1 debug| Child cleanup complete\n **** v1 CLI TX| status *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopped *** top varnish ** v1 Start **** v1 CLI TX| start *** v1 debug| child (7284) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 debug| Child (7284) said \n *** v1 debug| Child (7284) said Child starts\n *** v1 debug| Child (7284) said managed to mmap 10485760 bytes of 10485760 *** v1 debug| \n *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 4324\n ** v1 Listen on 127.0.0.1 4324 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=4324 **** v1 macro def v1_sock=127.0.0.1:4324 *** top varnish **** v1 macro undef v1_addr **** v1 macro undef v1_port **** v1 macro undef v1_sock ** v1 Stop **** v1 CLI TX| stop *** v1 CLI RX 200 **** v1 CLI TX| status *** v1 debug| Stopping Child\n *** v1 debug| Child (7284) said Child dies\n *** v1 debug| Child (7284) died\n *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopping *** v1 debug| Child cleanup complete\n **** v1 CLI TX| status *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopped *** top varnish ** v1 Start **** v1 CLI TX| start *** v1 debug| child (5556) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 debug| Child (5556) said \n *** v1 debug| Child (5556) said Child starts\n *** v1 debug| Child (5556) said managed to mmap 10485760 bytes of 10485760\n *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 4325\n ** v1 Listen on 127.0.0.1 4325 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=4325 **** v1 macro def v1_sock=127.0.0.1:4325 *** top varnish **** v1 macro undef v1_addr **** v1 macro undef v1_port **** v1 macro undef v1_sock ** v1 Stop **** v1 CLI TX| stop *** v1 CLI RX 200 **** v1 CLI TX| status *** v1 debug| Stopping Child\n *** v1 debug| Child (5556) said Child dies\n *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopping *** v1 debug| Child (5556) died\n *** v1 debug| Child cleanup complete\n **** v1 CLI TX| status *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopped *** top varnish **** v1 CLI TX| start *** v1 debug| child (6748) Started\n *** v1 CLI RX 200 ** v1 CLI 200 *** top varnish **** v1 CLI TX| start *** v1 CLI RX 300 **** v1 CLI RX| Child in state running ** v1 CLI 300 *** top varnish **** v1 CLI TX| start *** v1 CLI RX 300 **** v1 CLI RX| Child in state running ** v1 CLI 300 *** top varnish **** v1 CLI TX| stop *** v1 CLI RX 200 ** v1 CLI 200 *** top varnish **** v1 CLI TX| stop *** v1 CLI RX 300 **** v1 CLI RX| Child in state stopping ** v1 CLI 300 *** top varnish **** v1 CLI TX| stop *** v1 debug| Child (6748) said \n *** v1 debug| Child (6748) said Child starts\n *** v1 debug| Child (6748) said managed to mmap 10485760 bytes of 10485760\n *** v1 debug| Stopping Child\n *** v1 debug| Child (6748) said Child dies\n *** v1 CLI RX 300 **** v1 CLI RX| Child in state stopping ** v1 CLI 300 *** top varnish ** v1 Stop **** v1 CLI TX| stop *** v1 debug| Child (6748) died\n *** v1 CLI RX 300 **** v1 CLI RX| Child in state stopping **** v1 CLI TX| status *** v1 debug| Child cleanup complete\n *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopped ** v1 Wait ** v1 R 7852 Status: 0000 * top RESETTING after ././tests/b00004.vtc ** s1 Waiting for server * top Test timed out * top TEST ././tests/b00004.vtc FAILED FAIL: ./tests/b00004.vtc # top TEST ././tests/b00005.vtc passed (6.364s) PASS: ./tests/b00005.vtc # top TEST ././tests/b00006.vtc passed (5.417s) PASS: ./tests/b00006.vtc # top TEST ././tests/b00007.vtc passed (4.839s) PASS: ./tests/b00007.vtc # top TEST ././tests/b00008.vtc passed (4.891s) PASS: ./tests/b00008.vtc # top TEST ././tests/b00009.vtc passed (6.030s) PASS: ./tests/b00009.vtc # top TEST ././tests/b00010.vtc passed (6.589s) PASS: ./tests/b00010.vtc # top TEST ././tests/b00011.vtc passed (5.152s) PASS: ./tests/b00011.vtc # top TEST ././tests/b00012.vtc passed (4.853s) PASS: ./tests/b00012.vtc # top TEST ././tests/b00013.vtc passed (4.699s) PASS: ./tests/b00013.vtc # top TEST ././tests/b00014.vtc passed (6.555s) PASS: ./tests/b00014.vtc bind(): Address already in use Assert error in server_start(), vtc_server.c line 183: Condition(s->sock >= 0) not true. errno = 112 (Address already in use) /bin/sh: line 5: 5876 Aborted (core dumped) ./varnishtest ${dir}$tst FAIL: ./tests/b00015.vtc # top TEST ././tests/b00016.vtc passed (8.942s) PASS: ./tests/b00016.vtc # top TEST ././tests/b00017.vtc passed (4.794s) PASS: ./tests/b00017.vtc # top TEST ././tests/b00018.vtc passed (4.666s) PASS: ./tests/b00018.vtc # top TEST ././tests/b00019.vtc passed (4.580s) PASS: ./tests/b00019.vtc # top TEST ././tests/b00020.vtc passed (0.006s) PASS: ./tests/b00020.vtc # top TEST ././tests/b00021.vtc passed (0.005s) PASS: ./tests/b00021.vtc # top TEST ././tests/b00022.vtc passed (0.005s) PASS: ./tests/b00022.vtc # top TEST ././tests/b00023.vtc passed (0.005s) PASS: ./tests/b00023.vtc # top TEST ././tests/b00024.vtc passed (0.005s) PASS: ./tests/b00024.vtc # top TEST ././tests/b00025.vtc passed (0.007s) PASS: ./tests/b00025.vtc # top TEST ././tests/b00026.vtc passed (0.005s) PASS: ./tests/b00026.vtc # top TEST ././tests/b00027.vtc passed (4.802s) PASS: ./tests/b00027.vtc # top TEST ././tests/b00028.vtc passed (4.715s) PASS: ./tests/b00028.vtc # top TEST ././tests/b00029.vtc passed (7.721s) PASS: ./tests/b00029.vtc **** top macro def tmpdir=/tmp/vtc.7464.797707d4 **** top macro def bad_ip=10.255.255.255 * top TEST ././tests/b00030.vtc starting *** top test * top TEST Test formatting of timestamps *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=4484 **** s1 macro def s1_sock=127.0.0.1:4484 * s1 Listen on 127.0.0.1:4484 *** top varnish ** s1 Started on 127.0.0.1:4484 ** v1 Launch *** v1 CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.7464.797707d4/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tm p/vtc.7464.797707d4/v1/_S -M 127.0.0.1:4485 -P /tmp/vtc.7464.797707d4/v1/varnishd.pid -sfile,/tmp/vtc.7464.797707d4/v1,10M *** v1 debug| storage_file: filename: /tmp/vtc.7464.797707d4/v1/varnish.Zx5UKq size 10 MB.\n *** v1 debug| Platform: CYGWIN_NT-5.1,1.7.6(0.230/5/3),i686,-sfile,-hcritbit\n *** v1 debug| 200 193 \n *** v1 debug| -----------------------------\n *** v1 debug| Varnish HTTP accelerator CLI.\n *** v1 debug| -----------------------------\n *** v1 debug| Type 'help' for command list.\n *** v1 debug| Type 'quit' to close CLI session.\n *** v1 debug| Type 'start' to launch worker process.\n *** v1 debug| \n *** v1 CLI connection fd = 5 *** v1 CLI RX 107 **** v1 CLI RX| vvxvsnmgkmkxjvtjsmicgimzhseyazdy\n **** v1 CLI RX| \n **** v1 CLI RX| Authentication required.\n **** v1 CLI TX| auth 3d9aa8fc92306cf45b2e113742ae86ce22d2fd2691ce4c101eb9241667b0c39f\n *** v1 CLI RX 200 **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Varnish HTTP accelerator CLI.\n **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Type 'help' for command list.\n **** v1 CLI RX| Type 'quit' to close CLI session.\n **** v1 CLI RX| Type 'start' to launch worker process.\n **** v1 CLI TX| vcl.inline vcl1 "backend s1 { .host = \"127.0.0.1\"; .port = \"4484\"; }\n\n\tsub vcl_recv {\n\t\terror 200 req.grace;\n\t}\n\tsub vcl_error { \n\t\tset obj.http.x-timestamp = now;\n\t}\n" *** v1 CLI RX 200 **** v1 CLI RX| VCL compiled. **** v1 CLI TX| vcl.use vcl1 *** v1 CLI RX 200 ** v1 Start **** v1 CLI TX| start *** v1 debug| child (6932) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 debug| Child (6932) said \n *** v1 debug| Child (6932) said Child starts\n *** v1 debug| Child (6932) said managed to mmap 10485760 bytes of 10485760\n *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 4487\n ** v1 Listen on 127.0.0.1 4487 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=4487 **** v1 macro def v1_sock=127.0.0.1:4487 *** top client ** c1 Starting client ** c1 Waiting for client *** c1 Connect to 127.0.0.1:4487 *** c1 connected fd 8 *** c1 txreq **** c1 txreq| GET / HTTP/1.1\r\n **** c1 txreq| \r\n *** c1 rxresp **** c1 rxhdr| HTTP/1.1 200 10.000\r\n **** c1 rxhdr| Server: Varnish\r\n **** c1 rxhdr| Retry-After: 0\r\n **** c1 rxhdr| x-timestamp: Tue, 17 Aug 2010 11:41:09 GMT\r\n **** c1 rxhdr| Content-Type: text/html; charset=utf-8\r\n **** c1 rxhdr| Content-Length: 374\r\n **** c1 rxhdr| Date: Tue, 17 Aug 2010 11:41:09 GMT\r\n **** c1 rxhdr| X-Varnish: 1001\r\n **** c1 rxhdr| Age: 0\r\n **** c1 rxhdr| Via: 1.1 varnish\r\n **** c1 rxhdr| Connection: close\r\n **** c1 rxhdr| \r\n **** c1 http[ 0] | HTTP/1.1 **** c1 http[ 1] | 200 **** c1 http[ 2] | 10.000 **** c1 http[ 3] | Server: Varnish **** c1 http[ 4] | Retry-After: 0 **** c1 http[ 5] | x-timestamp: Tue, 17 Aug 2010 11:41:09 GMT **** c1 http[ 6] | Content-Type: text/html; charset=utf-8 **** c1 http[ 7] | Content-Length: 374 **** c1 http[ 8] | Date: Tue, 17 Aug 2010 11:41:09 GMT **** c1 http[ 9] | X-Varnish: 1001 **** c1 http[10] | Age: 0 **** c1 http[11] | Via: 1.1 varnish **** c1 http[12] | Connection: close **** c1 body| \n **** c1 body| \n **** c1 body| \n **** c1 body| \n **** c1 body| \n **** c1 body| 200 10.000\n **** c1 body| \n **** c1 body| \n **** c1 body|

Error 200 10.000

\n **** c1 body|

10.000

\n **** c1 body|

Guru Meditation:

\n **** c1 body|

XID: 1001

\n **** c1 body|
\n **** c1 body|

Varnish cache server

\n **** c1 body| \n **** c1 body| \n **** c1 bodylen = 374 *** c1 expect **** c1 EXPECT resp.msg (10.000) == 10.000 (10.000) match *** c1 closing fd 8 ** c1 Ending * top RESETTING after ././tests/b00030.vtc ** s1 Waiting for server * top Test timed out * top TEST ././tests/b00030.vtc FAILED FAIL: ./tests/b00030.vtc # top TEST ././tests/b00031.vtc passed (5.220s) PASS: ./tests/b00031.vtc # top TEST ././tests/b00032.vtc passed (1.598s) PASS: ./tests/b00032.vtc # top TEST ././tests/b00033.vtc passed (5.076s) PASS: ./tests/b00033.vtc # top TEST ././tests/c00001.vtc passed (4.931s) PASS: ./tests/c00001.vtc # top TEST ././tests/c00002.vtc passed (4.729s) PASS: ./tests/c00002.vtc # top TEST ././tests/c00003.vtc passed (4.655s) PASS: ./tests/c00003.vtc # top TEST ././tests/c00004.vtc passed (4.746s) PASS: ./tests/c00004.vtc ---- s1 HTTP rx failed (poll: No error) ---- v1 FAIL VCL does not compile **** top macro def tmpdir=/tmp/vtc.6600.039991f5 **** top macro def bad_ip=10.255.255.255 * top TEST ././tests/c00005.vtc starting *** top test * top TEST Test simple ACL *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=4542 **** s1 macro def s1_sock=127.0.0.1:4542 * s1 Listen on 127.0.0.1:4542 *** top varnish ** s1 Started on 127.0.0.1:4542 ** v1 Launch *** v1 CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.6600.039991f5/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tm p/vtc.6600.039991f5/v1/_S -M 127.0.0.1:4543 -P /tmp/vtc.6600.039991f5/v1/varnishd.pid -sfile,/tmp/vtc.6600.039991f5/v1,10M -p vcl_trace=on *** v1 debug| storage_file: filename: /tmp/vtc.6600.039991f5/v1/varnish.VtoRit size 10 MB.\n *** v1 debug| Platform: CYGWIN_NT-5.1,1.7.6(0.230/5/3),i686,-sfile,-hcritbit\n *** v1 debug| 200 193 \n *** v1 debug| -----------------------------\n *** v1 debug| Varnish HTTP accelerator CLI.\n *** v1 debug| -----------------------------\n *** v1 debug| Type 'help' for command list.\n *** v1 debug| Type 'quit' to close CLI session.\n *** v1 debug| Type 'start' to launch worker process.\n *** v1 debug| \n *** v1 CLI connection fd = 5 *** v1 CLI RX 107 **** v1 CLI RX| cpuhvyeqlnzglpbwmrtfurtlhodxldpp\n **** v1 CLI RX| \n **** v1 CLI RX| Authentication required.\n **** v1 CLI TX| auth 288b12d761f3ac6deb7eb970cadb2ff64a870a20ac3367b41e34ad1738e43752\n *** v1 CLI RX 200 **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Varnish HTTP accelerator CLI.\n **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Type 'help' for command list.\n **** v1 CLI RX| Type 'quit' to close CLI session.\n **** v1 CLI RX| Type 'start' to launch worker process.\n **** v1 CLI TX| vcl.inline vcl1 "backend s1 { .host = \"127.0.0.1\"; .port = \"4542\"; }\n\n\tacl acl1 {\n\t\t\"localhost\";\n\t}\n\n\tsub vcl_recv {\n\t\tif (client.ip ~ acl1) {\n\t\t\tset req.url = \"/\";\n\t\t}\n\t}\n" *** v1 CLI RX 200 **** v1 CLI RX| VCL compiled. **** v1 CLI TX| vcl.use vcl1 *** v1 CLI RX 200 ** v1 Start **** v1 CLI TX| start *** v1 debug| child (8024) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 debug| Child (8024) said \n *** v1 debug| Child (8024) said Child starts\n *** v1 debug| Child (8024) said managed to mmap 10485760 bytes of 10485760\n *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 4545\n ** v1 Listen on 127.0.0.1 4545 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=4545 **** v1 macro def v1_sock=127.0.0.1:4545 *** top client ** c1 Starting client *** c1 Connect to 127.0.0.1:4545 *** c1 connected fd 8 *** c1 txreq **** c1 txreq| GET foo HTTP/1.1\r\n **** c1 txreq| \r\n *** c1 rxresp ** c1 Waiting for client *** s1 accepted fd 9 *** s1 rxreq **** s1 rxhdr| GET / HTTP/1.1\r\n **** s1 rxhdr| X-Forwarded-For: 127.0.0.1\r\n **** s1 rxhdr| X-Varnish: 1001\r\n **** s1 rxhdr| Host: 127.0.0.1\r\n **** s1 rxhdr| \r\n **** s1 http[ 0] | GET **** s1 http[ 1] | / **** s1 http[ 2] | HTTP/1.1 **** s1 http[ 3] | X-Forwarded-For: 127.0.0.1 **** s1 http[ 4] | X-Varnish: 1001 **** s1 http[ 5] | Host: 127.0.0.1 **** s1 bodylen = 0 *** s1 expect **** s1 EXPECT req.url (/) == / (/) match *** s1 txresp **** s1 txresp| HTTP/1.1 200 Ok\r\n **** s1 txresp| Content-Length: 5\r\n **** s1 txresp| \r\n **** s1 txresp| 1111\n *** s1 rxreq **** c1 rxhdr| HTTP/1.1 200 Ok\r\n **** c1 rxhdr| Content-Length: 5\r\n **** c1 rxhdr| Date: Tue, 17 Aug 2010 11:42:16 GMT\r\n **** c1 rxhdr| X-Varnish: 1001\r\n **** c1 rxhdr| Age: 0\r\n **** c1 rxhdr| Via: 1.1 varnish\r\n **** c1 rxhdr| Connection: keep-alive\r\n **** c1 rxhdr| \r\n **** c1 http[ 0] | HTTP/1.1 **** c1 http[ 1] | 200 **** c1 http[ 2] | Ok **** c1 http[ 3] | Content-Length: 5 **** c1 http[ 4] | Date: Tue, 17 Aug 2010 11:42:16 GMT **** c1 http[ 5] | X-Varnish: 1001 **** c1 http[ 6] | Age: 0 **** c1 http[ 7] | Via: 1.1 varnish **** c1 http[ 8] | Connection: keep-alive **** c1 body| 1111\n **** c1 bodylen = 5 *** c1 expect **** c1 EXPECT resp.status (200) == 200 (200) match *** c1 closing fd 8 ** c1 Ending *** top varnish **** v1 CLI TX| vcl.inline vcl2 "backend s1 { .host = \"127.0.0.1\"; .port = \"4542\"; }\n\n\tacl acl1 {\n\t\t! \"localhost\";\n\t\t\"0.0.0.0\" / 0;\n\t\t\":: \" / 0;\n\t}\n\n\tsub vcl_recv {\n\t\tif (client.ip ~ acl1) {\n\t\t\tset req.url = \"/\";\n\t\t}\n\t}\n" ---- s1 HTTP rx failed (poll: No error) *** v1 CLI RX 106 **** v1 CLI RX| Message from VCC-compiler:\n **** v1 CLI RX| DNS lookup(::): hostname nor servname provided, or not known\n **** v1 CLI RX| (input Line 6 Pos 17)\n **** v1 CLI RX| "::" / 0;\n **** v1 CLI RX| ----------------####-----\n **** v1 CLI RX| Running VCC-compiler failed, exit 1\n **** v1 CLI RX| \n **** v1 CLI RX| VCL compilation failed ---- v1 FAIL VCL does not compile * top RESETTING after ././tests/c00005.vtc ** s1 Waiting for server **** s1 macro undef s1_addr **** s1 macro undef s1_port **** s1 macro undef s1_sock ** v1 Wait ** v1 R 3460 Status: 0000 * top TEST ././tests/c00005.vtc FAILED FAIL: ./tests/c00005.vtc # top TEST ././tests/c00006.vtc passed (5.314s) PASS: ./tests/c00006.vtc # top TEST ././tests/c00007.vtc passed (5.240s) PASS: ./tests/c00007.vtc # top TEST ././tests/c00008.vtc passed (4.854s) PASS: ./tests/c00008.vtc # top TEST ././tests/c00009.vtc passed (4.593s) PASS: ./tests/c00009.vtc # top TEST ././tests/c00010.vtc passed (4.849s) PASS: ./tests/c00010.vtc # top TEST ././tests/c00011.vtc passed (4.674s) PASS: ./tests/c00011.vtc # top TEST ././tests/c00012.vtc passed (4.812s) PASS: ./tests/c00012.vtc # top TEST ././tests/c00013.vtc passed (5.496s) PASS: ./tests/c00013.vtc # top TEST ././tests/c00014.vtc passed (4.940s) PASS: ./tests/c00014.vtc # top TEST ././tests/c00015.vtc passed (6.183s) PASS: ./tests/c00015.vtc # top TEST ././tests/c00016.vtc passed (4.578s) PASS: ./tests/c00016.vtc # top TEST ././tests/c00017.vtc passed (5.927s) PASS: ./tests/c00017.vtc # top TEST ././tests/c00018.vtc passed (4.845s) PASS: ./tests/c00018.vtc # top TEST ././tests/c00019.vtc passed (5.042s) PASS: ./tests/c00019.vtc # top TEST ././tests/c00020.vtc passed (4.687s) PASS: ./tests/c00020.vtc # top TEST ././tests/c00021.vtc passed (5.189s) PASS: ./tests/c00021.vtc # top TEST ././tests/c00022.vtc passed (5.183s) PASS: ./tests/c00022.vtc # top TEST ././tests/c00023.vtc passed (4.744s) PASS: ./tests/c00023.vtc # top TEST ././tests/c00024.vtc passed (4.511s) PASS: ./tests/c00024.vtc # top TEST ././tests/c00025.vtc passed (4.585s) PASS: ./tests/c00025.vtc # top TEST ././tests/c00026.vtc passed (4.669s) PASS: ./tests/c00026.vtc # top TEST ././tests/c00027.vtc passed (4.643s) PASS: ./tests/c00027.vtc # top TEST ././tests/c00028.vtc passed (5.084s) PASS: ./tests/c00028.vtc # top TEST ././tests/c00029.vtc passed (9.914s) PASS: ./tests/c00029.vtc # top TEST ././tests/c00030.vtc passed (9.628s) PASS: ./tests/c00030.vtc # top TEST ././tests/c00031.vtc passed (4.464s) PASS: ./tests/c00031.vtc # top TEST ././tests/c00032.vtc passed (4.698s) PASS: ./tests/c00032.vtc # top TEST ././tests/c00033.vtc passed (4.604s) PASS: ./tests/c00033.vtc # top TEST ././tests/c00034.vtc passed (4.789s) PASS: ./tests/c00034.vtc # top TEST ././tests/c00035.vtc passed (8.770s) PASS: ./tests/c00035.vtc # top TEST ././tests/c00036.vtc passed (4.801s) PASS: ./tests/c00036.vtc # top TEST ././tests/e00000.vtc passed (4.486s) PASS: ./tests/e00000.vtc # top TEST ././tests/e00001.vtc passed (4.590s) PASS: ./tests/e00001.vtc # top TEST ././tests/e00002.vtc passed (3.897s) PASS: ./tests/e00002.vtc # top TEST ././tests/e00003.vtc passed (4.483s) PASS: ./tests/e00003.vtc # top TEST ././tests/e00004.vtc passed (4.846s) PASS: ./tests/e00004.vtc # top TEST ././tests/e00005.vtc passed (4.545s) PASS: ./tests/e00005.vtc # top TEST ././tests/e00006.vtc passed (4.645s) PASS: ./tests/e00006.vtc # top TEST ././tests/e00007.vtc passed (4.725s) PASS: ./tests/e00007.vtc # top TEST ././tests/e00008.vtc passed (4.740s) PASS: ./tests/e00008.vtc # top TEST ././tests/e00009.vtc passed (4.564s) PASS: ./tests/e00009.vtc # top TEST ././tests/e00010.vtc passed (4.728s) PASS: ./tests/e00010.vtc # top TEST ././tests/e00011.vtc passed (4.979s) PASS: ./tests/e00011.vtc # top TEST ././tests/e00012.vtc passed (4.703s) PASS: ./tests/e00012.vtc # top TEST ././tests/e00013.vtc passed (4.534s) PASS: ./tests/e00013.vtc # top TEST ././tests/e00014.vtc passed (4.593s) PASS: ./tests/e00014.vtc # top TEST ././tests/e00015.vtc passed (4.724s) PASS: ./tests/e00015.vtc # top TEST ././tests/e00016.vtc passed (5.503s) PASS: ./tests/e00016.vtc # top TEST ././tests/e00017.vtc passed (4.613s) PASS: ./tests/e00017.vtc # top TEST ././tests/e00018.vtc passed (4.650s) PASS: ./tests/e00018.vtc # top TEST ././tests/p00000.vtc passed (8.508s) PASS: ./tests/p00000.vtc # top TEST ././tests/p00001.vtc passed (15.804s) PASS: ./tests/p00001.vtc **** top macro def tmpdir=/tmp/vtc.3516.0d138ca6 **** top macro def bad_ip=10.255.255.255 * top TEST ././tests/p00002.vtc starting *** top test * top TEST Ban a persistent object *** top shell **** top shell| rm -f /tmp/vtc.3516.0d138ca6/_.per[12] *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=4976 **** s1 macro def s1_sock=127.0.0.1:4976 * s1 Listen on 127.0.0.1:4976 ** s1 Started on 127.0.0.1:4976 *** top varnish ** v1 Launch *** v1 CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.3516.0d138ca6/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tm p/vtc.3516.0d138ca6/v1/_S -M 127.0.0.1:4977 -P /tmp/vtc.3516.0d138ca6/v1/varnishd.pid -spersistent,/tmp/vtc.3516.0d138ca6/_.per2,10m -pdiag_bitmap=0x20000 -pba n_lurker_sleep=0 *** v1 debug| sizeof(struct smp_ident) = 112 = 0x70\n *** v1 debug| sizeof(struct smp_sign) = 32 = 0x20\n *** v1 debug| sizeof(struct smp_segptr) = 32 = 0x20\n *** v1 debug| sizeof(struct smp_object) = 56 = 0x38\n *** v1 debug| CHK(0x7d2a88 SILO 0x7ecf0000 ) = 1\n *** v1 debug| min_nseg = 10, max_segl = 622585\n *** v1 debug| max_nseg = 26212, min_segl = 237\n *** v1 debug| aim_nseg = 511, aim_segl = 12183\n *** v1 debug| aim_nobj = 155\n *** v1 debug| free_reserve = 121830\n *** v1 debug| Platform: CYGWIN_NT-5.1,1.7.6(0.230/5/3),i686,-spersistent,-hcritbit\n *** v1 debug| 200 193 \n *** v1 debug| -----------------------------\n *** v1 debug| Varnish HTTP accelerator CLI.\n *** v1 debug| -----------------------------\n *** v1 debug| Type 'help' for command list.\n *** v1 debug| Type 'quit' to close CLI session.\n *** v1 debug| Type 'start' to launch worker process.\n *** v1 debug| \n *** v1 CLI connection fd = 5 *** v1 CLI RX 107 **** v1 CLI RX| vkhtlotcjzouujmxmtkrqqsyfmqxtrar\n **** v1 CLI RX| \n **** v1 CLI RX| Authentication required.\n **** v1 CLI TX| auth dd9dcd9ef536236da90edfe19b1265e6239897ced4ed3fe97002117351ee127c\n *** v1 CLI RX 200 **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Varnish HTTP accelerator CLI.\n **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Type 'help' for command list.\n **** v1 CLI RX| Type 'quit' to close CLI session.\n **** v1 CLI RX| Type 'start' to launch worker process.\n **** v1 CLI TX| vcl.inline vcl1 "backend s1 { .host = \"127.0.0.1\"; .port = \"4976\"; }\n " *** v1 CLI RX 200 **** v1 CLI RX| VCL compiled. **** v1 CLI TX| vcl.use vcl1 *** v1 CLI RX 200 ** v1 Start **** v1 CLI TX| start *** v1 debug| child (5896) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 debug| Child (5896) said \n *** v1 debug| Child (5896) said Child starts\n *** v1 debug| Child (5896) said Silo completely loaded\n *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 4979\n ** v1 Listen on 127.0.0.1 4979 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=4979 **** v1 macro def v1_sock=127.0.0.1:4979 *** top client ** c1 Starting client *** c1 Connect to 127.0.0.1:4979 *** c1 connected fd 8 *** c1 txreq **** c1 txreq| GET / HTTP/1.1\r\n **** c1 txreq| \r\n *** c1 rxresp ** c1 Waiting for client *** s1 accepted fd 9 *** s1 rxreq **** s1 rxhdr| GET / HTTP/1.1\r\n **** s1 rxhdr| X-Forwarded-For: 127.0.0.1\r\n **** s1 rxhdr| X-Varnish: 1001\r\n **** s1 rxhdr| Host: 127.0.0.1\r\n **** s1 rxhdr| \r\n **** s1 http[ 0] | GET **** s1 http[ 1] | / **** s1 http[ 2] | HTTP/1.1 **** s1 http[ 3] | X-Forwarded-For: 127.0.0.1 **** s1 http[ 4] | X-Varnish: 1001 **** s1 http[ 5] | Host: 127.0.0.1 **** s1 bodylen = 0 *** s1 txresp **** s1 txresp| HTTP/1.1 200 Ok\r\n **** s1 txresp| Foo: foo\r\n **** s1 txresp| Content-Length: 0\r\n **** s1 txresp| \r\n *** s1 shutting fd 9 ** s1 Ending **** c1 rxhdr| HTTP/1.1 200 Ok\r\n **** c1 rxhdr| Foo: foo\r\n **** c1 rxhdr| Content-Length: 0\r\n **** c1 rxhdr| Date: Tue, 17 Aug 2010 11:47:40 GMT\r\n **** c1 rxhdr| X-Varnish: 1001\r\n **** c1 rxhdr| Age: 0\r\n **** c1 rxhdr| Via: 1.1 varnish\r\n **** c1 rxhdr| Connection: keep-alive\r\n **** c1 rxhdr| \r\n **** c1 http[ 0] | HTTP/1.1 **** c1 http[ 1] | 200 **** c1 http[ 2] | Ok **** c1 http[ 3] | Foo: foo **** c1 http[ 4] | Content-Length: 0 **** c1 http[ 5] | Date: Tue, 17 Aug 2010 11:47:40 GMT **** c1 http[ 6] | X-Varnish: 1001 **** c1 http[ 7] | Age: 0 **** c1 http[ 8] | Via: 1.1 varnish **** c1 http[ 9] | Connection: keep-alive **** c1 bodylen = 0 *** c1 expect **** c1 EXPECT resp.status (200) == 200 (200) match *** c1 expect **** c1 EXPECT resp.http.X-Varnish (1001) == 1001 (1001) match *** c1 expect **** c1 EXPECT resp.http.foo (foo) == foo (foo) match *** c1 closing fd 8 ** c1 Ending *** top varnish **** v1 CLI TX| purge req.url == / && req.http.jam != session *** v1 CLI RX 200 ** v1 CLI 200 *** top varnish **** v1 macro undef v1_addr **** v1 macro undef v1_port **** v1 macro undef v1_sock ** v1 Stop **** v1 CLI TX| stop *** v1 CLI RX 200 **** v1 CLI TX| status *** v1 debug| Stopping Child\n *** v1 debug| Child (5896) said Child dies *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopping *** v1 debug| \n *** v1 debug| Child (5896) died\n *** v1 debug| Child cleanup complete\n **** v1 CLI TX| status *** v1 CLI RX 200 **** v1 CLI RX| Child in state stopped *** top server ** s1 Waiting for server *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=4976 **** s1 macro def s1_sock=127.0.0.1:4976 * s1 Listen on 127.0.0.1:4976 *** top varnish ** v1 Start **** v1 CLI TX| start ** s1 Started on 127.0.0.1:4976 *** v1 debug| child (4680) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 debug| Child (4680) said \n *** v1 debug| Child (4680) said Child starts\n *** v1 debug| Child (4680) said Dropped 0 segments to make free_reserve\n *** v1 debug| Child (4680) said Silo completely loaded\n *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 4982\n ** v1 Listen on 127.0.0.1 4982 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=4982 **** v1 macro def v1_sock=127.0.0.1:4982 *** top varnish **** v1 CLI TX| purge.list *** v1 CLI RX 200 **** v1 CLI RX| 0x7e0b00 1282045662.237500 0G\t\n **** v1 CLI RX| 0x7e0d28 1282045660.966500 0 \treq.url == / && req.http.jam != session\n **** v1 CLI RX| 0x7e0ca8 1282045659.860500 1G\t\n ** v1 CLI 200 *** top varnish ** v1 as expected: n_purge (3) == 3 * top RESETTING after ././tests/p00002.vtc ** s1 Waiting for server * top Test timed out * top TEST ././tests/p00002.vtc FAILED FAIL: ./tests/p00002.vtc # top TEST ././tests/p00003.vtc passed (10.591s) PASS: ./tests/p00003.vtc # top TEST ././tests/p00004.vtc passed (6.901s) PASS: ./tests/p00004.vtc # top TEST ././tests/p00005.vtc passed (13.355s) PASS: ./tests/p00005.vtc # top TEST ././tests/p00006.vtc passed (6.315s) PASS: ./tests/p00006.vtc # top TEST ././tests/r00102.vtc passed (4.751s) PASS: ./tests/r00102.vtc # top TEST ././tests/r00251.vtc passed (5.153s) PASS: ./tests/r00251.vtc # top TEST ././tests/r00255.vtc passed (5.023s) PASS: ./tests/r00255.vtc # top TEST ././tests/r00262.vtc passed (4.707s) PASS: ./tests/r00262.vtc # top TEST ././tests/r00263.vtc passed (5.821s) PASS: ./tests/r00263.vtc # top TEST ././tests/r00292.vtc passed (4.595s) PASS: ./tests/r00292.vtc # top TEST ././tests/r00306.vtc passed (4.511s) PASS: ./tests/r00306.vtc # top TEST ././tests/r00318.vtc passed (4.818s) PASS: ./tests/r00318.vtc # top TEST ././tests/r00325.vtc passed (4.609s) PASS: ./tests/r00325.vtc # top TEST ././tests/r00326.vtc passed (4.748s) PASS: ./tests/r00326.vtc # top TEST ././tests/r00345.vtc passed (5.725s) PASS: ./tests/r00345.vtc # top TEST ././tests/r00365.vtc passed (4.950s) PASS: ./tests/r00365.vtc # top TEST ././tests/r00386.vtc passed (4.827s) PASS: ./tests/r00386.vtc # top TEST ././tests/r00387.vtc passed (4.649s) PASS: ./tests/r00387.vtc # top TEST ././tests/r00400.vtc passed (4.606s) PASS: ./tests/r00400.vtc # top TEST ././tests/r00409.vtc passed (2.158s) PASS: ./tests/r00409.vtc # top TEST ././tests/r00412.vtc passed (4.932s) PASS: ./tests/r00412.vtc # top TEST ././tests/r00416.vtc passed (4.876s) PASS: ./tests/r00416.vtc # top TEST ././tests/r00425.vtc passed (5.232s) PASS: ./tests/r00425.vtc # top TEST ././tests/r00427.vtc passed (4.650s) PASS: ./tests/r00427.vtc **** top macro def tmpdir=/tmp/vtc.4924.544d0a80 **** top macro def bad_ip=10.255.255.255 * top TEST ././tests/r00433.vtc starting *** top test * top TEST noidx *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=1192 **** s1 macro def s1_sock=127.0.0.1:1192 * s1 Listen on 127.0.0.1:1192 *** top server ** s1 Started on 127.0.0.1:1192 ** s2 Starting server **** s2 macro def s2_addr=127.0.0.1 **** s2 macro def s2_port=1193 **** s2 macro def s2_sock=127.0.0.1:1193 * s2 Listen on 127.0.0.1:1193 ** s2 Started on 127.0.0.1:1193 *** top varnish ** v1 Launch *** v1 CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.4924.544d0a80/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tm p/vtc.4924.544d0a80/v1/_S -M 127.0.0.1:1194 -P /tmp/vtc.4924.544d0a80/v1/varnishd.pid -sfile,/tmp/vtc.4924.544d0a80/v1,10M *** v1 debug| storage_file: filename: /tmp/vtc.4924.544d0a80/v1/varnish.Fxv3KN size 10 MB.\n *** v1 debug| Platform: CYGWIN_NT-5.1,1.7.6(0.230/5/3),i686,-sfile,-hcritbit\n *** v1 debug| 200 193 \n *** v1 debug| -----------------------------\n *** v1 debug| Varnish HTTP accelerator CLI.\n *** v1 debug| -----------------------------\n *** v1 debug| Type 'help' for command list.\n *** v1 debug| Type 'quit' to close CLI session.\n *** v1 debug| Type 'start' to launch worker process.\n *** v1 debug| \n *** v1 CLI connection fd = 6 *** v1 CLI RX 107 **** v1 CLI RX| rfowxmvgcdvwyiwdishykumicdmlwniq\n **** v1 CLI RX| \n **** v1 CLI RX| Authentication required.\n **** v1 CLI TX| auth b86c21e8ab8e2dd315a3d93defec68122d5c933eb5120a926ef40930082b3f02\n *** v1 CLI RX 200 **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Varnish HTTP accelerator CLI.\n **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Type 'help' for command list.\n **** v1 CLI RX| Type 'quit' to close CLI session.\n **** v1 CLI RX| Type 'start' to launch worker process.\n **** v1 CLI TX| vcl.inline vcl1 "backend s1 { .host = \"127.0.0.1\"; .port = \"1192\"; }\nbackend s2 { .host = \"127.0.0.1\"; .port = \"1193\"; }\n\n\tsub vcl _recv {\n\t\tif (req.url == \"/foo\") {\n\t\t\tset req.backend = s1;\n\t\t} else {\n\t\t\tset req.backend = s2;\n\t\t}\n\t}\n\n\tsub vcl_fetch {\n\t\tesi;\n\t}\ n" *** v1 CLI RX 200 **** v1 CLI RX| VCL compiled. **** v1 CLI TX| vcl.use vcl1 *** v1 CLI RX 200 ** v1 Start **** v1 CLI TX| start *** v1 debug| child (4772) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 debug| Child (4772) said \n *** v1 debug| Child (4772) said Child starts\n *** v1 debug| Child (4772) said managed to mmap 10485760 bytes of 10485760\n *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 1204\n ** v1 Listen on 127.0.0.1 1204 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=1204 **** v1 macro def v1_sock=127.0.0.1:1204 *** top varnish **** v1 CLI TX| param.set esi_syntax 4 *** v1 CLI RX 200 ** v1 CLI 200 *** top varnish **** v1 CLI TX| param.set diag_bitmap 0x10000 *** v1 CLI RX 200 ** v1 CLI 200 *** top varnish **** v1 CLI TX| debug.fragfetch 32 *** v1 CLI RX 200 ** v1 CLI 200 *** top client ** c1 Starting client ** c1 Waiting for client *** c1 Connect to 127.0.0.1:1204 *** c1 connected fd 9 *** c1 txreq **** c1 txreq| GET /foo HTTP/1.1\r\n **** c1 txreq| \r\n *** c1 rxresp *** s1 accepted fd 10 *** s1 rxreq **** s1 rxhdr| GET /foo HTTP/1.1\r\n **** s1 rxhdr| X-Forwarded-For: 127.0.0.1\r\n **** s1 rxhdr| X-Varnish: 1001\r\n **** s1 rxhdr| Host: 127.0.0.1\r\n **** s1 rxhdr| \r\n **** s1 http[ 0] | GET **** s1 http[ 1] | /foo **** s1 http[ 2] | HTTP/1.1 **** s1 http[ 3] | X-Forwarded-For: 127.0.0.1 **** s1 http[ 4] | X-Varnish: 1001 **** s1 http[ 5] | Host: 127.0.0.1 **** s1 bodylen = 0 *** s1 expect **** s1 EXPECT req.url (/foo) == /foo (/foo) match *** s1 txresp **** s1 txresp| HTTP/1.1 200 Ok\r\n **** s1 txresp| Connection: close\r\n **** s1 txresp| Content-Length: 0\r\n **** s1 txresp| \r\n *** s1 send **** s1 send| \n **** s1 send| \n **** s1 send| FOO{\n **** s1 send| \n **** s1 send| }FOO\n **** s1 send| \n **** s1 send| The end.\n *** s1 shutting fd 10 ** s1 Ending **** c1 rxhdr| HTTP/1.1 200 Ok\r\n **** c1 rxhdr| Content-Length: 0\r\n **** c1 rxhdr| Date: Tue, 17 Aug 2010 11:50:39 GMT\r\n **** c1 rxhdr| X-Varnish: 1001\r\n **** c1 rxhdr| Age: 0\r\n **** c1 rxhdr| Via: 1.1 varnish\r\n **** c1 rxhdr| Connection: keep-alive\r\n **** c1 rxhdr| \r\n **** c1 http[ 0] | HTTP/1.1 **** c1 http[ 1] | 200 **** c1 http[ 2] | Ok **** c1 http[ 3] | Content-Length: 0 **** c1 http[ 4] | Date: Tue, 17 Aug 2010 11:50:39 GMT **** c1 http[ 5] | X-Varnish: 1001 **** c1 http[ 6] | Age: 0 **** c1 http[ 7] | Via: 1.1 varnish **** c1 http[ 8] | Connection: keep-alive **** c1 bodylen = 0 *** c1 closing fd 9 ** c1 Ending * top RESETTING after ././tests/r00433.vtc ** s1 Waiting for server **** s1 macro undef s1_addr **** s1 macro undef s1_port **** s1 macro undef s1_sock ** s2 Waiting for server * top Test timed out * top TEST ././tests/r00433.vtc FAILED FAIL: ./tests/r00433.vtc # top TEST ././tests/r00444.vtc passed (5.236s) PASS: ./tests/r00444.vtc # top TEST ././tests/r00445.vtc passed (4.889s) PASS: ./tests/r00445.vtc # top TEST ././tests/r00466.vtc passed (5.179s) PASS: ./tests/r00466.vtc # top TEST ././tests/r00476.vtc passed (5.196s) PASS: ./tests/r00476.vtc # top TEST ././tests/r00494.vtc passed (4.865s) PASS: ./tests/r00494.vtc # top TEST ././tests/r00495.vtc passed (4.663s) PASS: ./tests/r00495.vtc # top TEST ././tests/r00498.vtc passed (5.338s) PASS: ./tests/r00498.vtc # top TEST ././tests/r00502.vtc passed (5.119s) PASS: ./tests/r00502.vtc # top TEST ././tests/r00506.vtc passed (4.963s) PASS: ./tests/r00506.vtc # top TEST ././tests/r00524.vtc passed (4.893s) PASS: ./tests/r00524.vtc # top TEST ././tests/r00549.vtc passed (4.567s) PASS: ./tests/r00549.vtc **** top macro def tmpdir=/tmp/vtc.3992.0a9962d0 **** top macro def bad_ip=10.255.255.255 * top TEST ././tests/r00558.vtc starting *** top test * top TEST error from vcl_recv{} has no numeric code *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=1355 **** s1 macro def s1_sock=127.0.0.1:1355 * s1 Listen on 127.0.0.1:1355 ** s1 Started on 127.0.0.1:1355 *** top varnish ** v1 Launch *** v1 CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.3992.0a9962d0/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tm p/vtc.3992.0a9962d0/v1/_S -M 127.0.0.1:1357 -P /tmp/vtc.3992.0a9962d0/v1/varnishd.pid -sfile,/tmp/vtc.3992.0a9962d0/v1,10M *** v1 debug| storage_file: filename: /tmp/vtc.3992.0a9962d0/v1/varnish.0Jsca0 size 10 MB.\n *** v1 debug| Platform: CYGWIN_NT-5.1,1.7.6(0.230/5/3),i686,-sfile,-hcritbit\n *** v1 debug| 200 193 \n *** v1 debug| -----------------------------\n *** v1 debug| Varnish HTTP accelerator CLI.\n *** v1 debug| -----------------------------\n *** v1 debug| Type 'help' for command list.\n *** v1 debug| Type 'quit' to close CLI session.\n *** v1 debug| Type 'start' to launch worker process.\n *** v1 debug| \n *** v1 CLI connection fd = 5 *** v1 CLI RX 107 **** v1 CLI RX| vfronguhqupffahmytdpasiisktadjny\n **** v1 CLI RX| \n **** v1 CLI RX| Authentication required.\n **** v1 CLI TX| auth 16417b558335763e129c48c3a73e5c575924c4cba024e2ef0cf7f910ce17b9a2\n *** v1 CLI RX 200 **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Varnish HTTP accelerator CLI.\n **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Type 'help' for command list.\n **** v1 CLI RX| Type 'quit' to close CLI session.\n **** v1 CLI RX| Type 'start' to launch worker process.\n **** v1 CLI TX| vcl.inline vcl1 "backend s1 { .host = \"127.0.0.1\"; .port = \"1355\"; }\n\n\tsub vcl_recv {\n\t\treturn (error);\n\t}\n" *** v1 CLI RX 200 **** v1 CLI RX| VCL compiled. **** v1 CLI TX| vcl.use vcl1 *** v1 CLI RX 200 ** v1 Start **** v1 CLI TX| start *** v1 debug| child (1396) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 debug| Child (1396) said \n *** v1 debug| Child (1396) said Child starts\n *** v1 debug| Child (1396) said managed to mmap 10485760 bytes of 10485760\n *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 1360\n ** v1 Listen on 127.0.0.1 1360 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=1360 **** v1 macro def v1_sock=127.0.0.1:1360 *** top client ** c1 Starting client ** c1 Waiting for client *** c1 Connect to 127.0.0.1:1360 *** c1 connected fd 8 *** c1 txreq **** c1 txreq| GET / HTTP/1.1\r\n **** c1 txreq| \r\n *** c1 rxresp **** c1 rxhdr| HTTP/1.1 501 Not Implemented\r\n **** c1 rxhdr| Server: Varnish\r\n **** c1 rxhdr| Retry-After: 0\r\n **** c1 rxhdr| Content-Type: text/html; charset=utf-8\r\n **** c1 rxhdr| Content-Length: 401\r\n **** c1 rxhdr| Date: Tue, 17 Aug 2010 11:52:13 GMT\r\n **** c1 rxhdr| X-Varnish: 1001\r\n **** c1 rxhdr| Age: 0\r\n **** c1 rxhdr| Via: 1.1 varnish\r\n **** c1 rxhdr| Connection: close\r\n **** c1 rxhdr| \r\n **** c1 http[ 0] | HTTP/1.1 **** c1 http[ 1] | 501 **** c1 http[ 2] | Not Implemented **** c1 http[ 3] | Server: Varnish **** c1 http[ 4] | Retry-After: 0 **** c1 http[ 5] | Content-Type: text/html; charset=utf-8 **** c1 http[ 6] | Content-Length: 401 **** c1 http[ 7] | Date: Tue, 17 Aug 2010 11:52:13 GMT **** c1 http[ 8] | X-Varnish: 1001 **** c1 http[ 9] | Age: 0 **** c1 http[10] | Via: 1.1 varnish **** c1 http[11] | Connection: close **** c1 body| \n **** c1 body| \n **** c1 body| \n **** c1 body| \n **** c1 body| \n **** c1 body| 501 Not Implemented\n **** c1 body| \n **** c1 body| \n **** c1 body|

Error 501 Not Implemented

\n **** c1 body|

Not Implemented

\n **** c1 body|

Guru Meditation:

\n **** c1 body|

XID: 1001

\n **** c1 body|
\n **** c1 body|

Varnish cache server

\n **** c1 body| \n **** c1 body| \n **** c1 bodylen = 401 *** c1 expect **** c1 EXPECT resp.status (501) == 501 (501) match *** c1 closing fd 8 ** c1 Ending * top RESETTING after ././tests/r00558.vtc ** s1 Waiting for server * top Test timed out * top TEST ././tests/r00558.vtc FAILED FAIL: ./tests/r00558.vtc # top TEST ././tests/r00561.vtc passed (5.334s) PASS: ./tests/r00561.vtc # top TEST ././tests/r00590.vtc passed (5.135s) PASS: ./tests/r00590.vtc # top TEST ././tests/r00612.vtc passed (5.063s) PASS: ./tests/r00612.vtc # top TEST ././tests/r00641.vtc passed (4.789s) PASS: ./tests/r00641.vtc # top TEST ././tests/r00655.vtc passed (1.920s) PASS: ./tests/r00655.vtc # top TEST ././tests/r00667.vtc passed (5.734s) PASS: ./tests/r00667.vtc # top TEST ././tests/r00679.vtc passed (4.717s) PASS: ./tests/r00679.vtc # top TEST ././tests/r00693.vtc passed (0.005s) PASS: ./tests/r00693.vtc # top TEST ././tests/r00694.vtc passed (9.393s) PASS: ./tests/r00694.vtc # top TEST ././tests/r00700.vtc passed (4.622s) PASS: ./tests/r00700.vtc # top TEST ././tests/r00702.vtc passed (4.533s) PASS: ./tests/r00702.vtc # top TEST ././tests/r00704.vtc passed (4.645s) PASS: ./tests/r00704.vtc # top TEST ././tests/r00722.vtc passed (6.086s) PASS: ./tests/r00722.vtc # top TEST ././tests/r00730.vtc passed (6.204s) PASS: ./tests/r00730.vtc # top TEST ././tests/r00733.vtc passed (4.998s) PASS: ./tests/r00733.vtc # top TEST ././tests/r00742.vtc passed (4.553s) PASS: ./tests/r00742.vtc # top TEST ././tests/s00000.vtc passed (7.754s) PASS: ./tests/s00000.vtc # top TEST ././tests/s00001.vtc passed (7.206s) PASS: ./tests/s00001.vtc # top TEST ././tests/s00002.vtc passed (12.084s) PASS: ./tests/s00002.vtc # top TEST ././tests/s00003.vtc passed (9.132s) PASS: ./tests/s00003.vtc # top TEST ././tests/v00000.vtc passed (6.609s) PASS: ./tests/v00000.vtc # top TEST ././tests/v00001.vtc passed (6.567s) PASS: ./tests/v00001.vtc # top TEST ././tests/v00002.vtc passed (11.835s) PASS: ./tests/v00002.vtc # top TEST ././tests/v00003.vtc passed (6.352s) PASS: ./tests/v00003.vtc # top TEST ././tests/v00004.vtc passed (13.915s) PASS: ./tests/v00004.vtc # top TEST ././tests/v00005.vtc passed (7.414s) PASS: ./tests/v00005.vtc # top TEST ././tests/v00006.vtc passed (8.633s) PASS: ./tests/v00006.vtc # top TEST ././tests/v00007.vtc passed (4.852s) PASS: ./tests/v00007.vtc # top TEST ././tests/v00008.vtc passed (6.404s) PASS: ./tests/v00008.vtc bind(): Address already in use Assert error in server_start(), vtc_server.c line 183: Condition(s->sock >= 0) not true. errno = 112 (Address already in use) /bin/sh: line 5: 5756 Aborted (core dumped) ./varnishtest ${dir}$tst FAIL: ./tests/v00009.vtc # top TEST ././tests/v00010.vtc passed (7.369s) PASS: ./tests/v00010.vtc # top TEST ././tests/v00011.vtc passed (4.926s) PASS: ./tests/v00011.vtc # top TEST ././tests/v00012.vtc passed (4.879s) PASS: ./tests/v00012.vtc # top TEST ././tests/v00013.vtc passed (4.765s) PASS: ./tests/v00013.vtc # top TEST ././tests/v00014.vtc passed (6.826s) PASS: ./tests/v00014.vtc # top TEST ././tests/v00015.vtc passed (4.956s) PASS: ./tests/v00015.vtc # top TEST ././tests/v00016.vtc passed (10.295s) PASS: ./tests/v00016.vtc # top TEST ././tests/v00017.vtc passed (23.938s) PASS: ./tests/v00017.vtc # top TEST ././tests/v00018.vtc passed (17.145s) PASS: ./tests/v00018.vtc # top TEST ././tests/v00019.vtc passed (7.523s) PASS: ./tests/v00019.vtc # top TEST ././tests/v00020.vtc passed (6.384s) PASS: ./tests/v00020.vtc # top TEST ././tests/v00021.vtc passed (3.205s) PASS: ./tests/v00021.vtc # top TEST ././tests/v00022.vtc passed (6.498s) PASS: ./tests/v00022.vtc # top TEST ././tests/v00023.vtc passed (5.535s) PASS: ./tests/v00023.vtc # top TEST ././tests/v00024.vtc passed (5.633s) PASS: ./tests/v00024.vtc # top TEST ././tests/v00025.vtc passed (5.006s) PASS: ./tests/v00025.vtc # top TEST ././tests/v00026.vtc passed (4.956s) PASS: ./tests/v00026.vtc **** top macro def tmpdir=/tmp/vtc.7364.5c50472e **** top macro def bad_ip=10.255.255.255 * top TEST ././tests/v00027.vtc starting *** top test * top TEST Check that backend named 'default' is the default *** top server ** s1 Starting server **** s1 macro def s1_addr=127.0.0.1 **** s1 macro def s1_port=1673 **** s1 macro def s1_sock=127.0.0.1:1673 * s1 Listen on 127.0.0.1:1673 *** top server ** s1 Started on 127.0.0.1:1673 ** s2 Starting server **** s2 macro def s2_addr=127.0.0.1 **** s2 macro def s2_port=1674 **** s2 macro def s2_sock=127.0.0.1:1674 * s2 Listen on 127.0.0.1:1674 ** s2 Started on 127.0.0.1:1674 *** top varnish ** v1 Launch *** v1 CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.7364.5c50472e/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tm p/vtc.7364.5c50472e/v1/_S -M 127.0.0.1:1675 -P /tmp/vtc.7364.5c50472e/v1/varnishd.pid -sfile,/tmp/vtc.7364.5c50472e/v1,10M *** v1 debug| storage_file: filename: /tmp/vtc.7364.5c50472e/v1/varnish.Wq7cZk size 10 MB.\n *** v1 debug| Platform: CYGWIN_NT-5.1,1.7.6(0.230/5/3),i686,-sfile,-hcritbit\n *** v1 debug| 200 193 \n *** v1 debug| -----------------------------\n *** v1 debug| Varnish HTTP accelerator CLI.\n *** v1 debug| -----------------------------\n *** v1 debug| Type 'help' for command list.\n *** v1 debug| Type 'quit' to close CLI session.\n *** v1 debug| Type 'start' to launch worker process.\n *** v1 debug| \n *** v1 CLI connection fd = 6 *** v1 CLI RX 107 **** v1 CLI RX| jtkbwoymxpiwkclwqfjmakptdjjofivo\n **** v1 CLI RX| \n **** v1 CLI RX| Authentication required.\n **** v1 CLI TX| auth 6703475ab8e73977f9c77b250bf0cd9f98ad5a07d8205fcc532eca9ff300d39d\n *** v1 CLI RX 200 **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Varnish HTTP accelerator CLI.\n **** v1 CLI RX| -----------------------------\n **** v1 CLI RX| Type 'help' for command list.\n **** v1 CLI RX| Type 'quit' to close CLI session.\n **** v1 CLI RX| Type 'start' to launch worker process.\n **** v1 CLI TX| vcl.inline vcl1 "\n\tbackend s1 {\n\t\t.host = \"127.0.0.1\"; \n\t\t.port = \"1673\";\n\t}\n\tbackend default {\n\t\t.host = \"127.0.0.1\";\n\ t\t.port = \"1674\";\n\t}\n\n\tsub vcl_recv {\n\t\tif (req.url != req.url) {\n\t\t\tset req.backend = s1;\n\t\t}\n\t}\n" *** v1 CLI RX 200 **** v1 CLI RX| VCL compiled. **** v1 CLI TX| vcl.use vcl1 *** v1 CLI RX 200 ** v1 Start **** v1 CLI TX| start *** v1 debug| child (4624) Started\n *** v1 CLI RX 200 **** v1 CLI TX| debug.xid 1000 *** v1 CLI RX 200 **** v1 CLI RX| XID is 1000 **** v1 CLI TX| debug.listen_address *** v1 debug| Child (4624) said \n *** v1 debug| Child (4624) said Child starts\n *** v1 debug| Child (4624) said managed to mmap 10485760 bytes of 10485760\n *** v1 CLI RX 200 **** v1 CLI RX| 127.0.0.1 1677\n ** v1 Listen on 127.0.0.1 1677 **** v1 macro def v1_addr=127.0.0.1 **** v1 macro def v1_port=1677 **** v1 macro def v1_sock=127.0.0.1:1677 *** top client ** c1 Starting client ** c1 Waiting for client *** c1 Connect to 127.0.0.1:1677 *** c1 connected fd 9 *** c1 txreq **** c1 txreq| GET / HTTP/1.1\r\n **** c1 txreq| \r\n *** c1 rxresp *** s2 accepted fd 10 *** s2 rxreq **** s2 rxhdr| GET / HTTP/1.1\r\n **** s2 rxhdr| X-Forwarded-For: 127.0.0.1\r\n **** s2 rxhdr| X-Varnish: 1001\r\n **** s2 rxhdr| Host: 127.0.0.1\r\n **** s2 rxhdr| \r\n **** s2 http[ 0] | GET **** s2 http[ 1] | / **** s2 http[ 2] | HTTP/1.1 **** s2 http[ 3] | X-Forwarded-For: 127.0.0.1 **** s2 http[ 4] | X-Varnish: 1001 **** s2 http[ 5] | Host: 127.0.0.1 **** s2 bodylen = 0 *** s2 txresp **** s2 txresp| HTTP/1.1 200 Ok\r\n **** s2 txresp| Content-Length: 52\r\n **** s2 txresp| \r\n **** s2 txresp| !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS\n *** s2 shutting fd 10 ** s2 Ending **** c1 rxhdr| HTTP/1.1 200 Ok\r\n **** c1 rxhdr| Content-Length: 52\r\n **** c1 rxhdr| Date: Tue, 17 Aug 2010 11:58:44 GMT\r\n **** c1 rxhdr| X-Varnish: 1001\r\n **** c1 rxhdr| Age: 0\r\n **** c1 rxhdr| Via: 1.1 varnish\r\n **** c1 rxhdr| Connection: keep-alive\r\n **** c1 rxhdr| \r\n **** c1 http[ 0] | HTTP/1.1 **** c1 http[ 1] | 200 **** c1 http[ 2] | Ok **** c1 http[ 3] | Content-Length: 52 **** c1 http[ 4] | Date: Tue, 17 Aug 2010 11:58:44 GMT **** c1 http[ 5] | X-Varnish: 1001 **** c1 http[ 6] | Age: 0 **** c1 http[ 7] | Via: 1.1 varnish **** c1 http[ 8] | Connection: keep-alive **** c1 body| !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS\n **** c1 bodylen = 52 *** c1 expect **** c1 EXPECT resp.bodylen (52) == 52 (52) match *** c1 closing fd 9 ** c1 Ending * top RESETTING after ././tests/v00027.vtc ** s1 Waiting for server * top Test timed out * top TEST ././tests/v00027.vtc FAILED FAIL: ./tests/v00027.vtc # top TEST ././tests/v00028.vtc passed (5.133s) PASS: ./tests/v00028.vtc ============================================== 9 of 189 tests failed Please report to varnish-dev at varnish-cache.org ============================================== make[1]: *** [check-TESTS] Error 1 make[1]: Leaving directory `/tmp/varnish-cache/bin/varnishtest' make: *** [check-am] Error 2 -------------- next part -------------- A non-text attachment was scrubbed... Name: cygwin_changes_r_5110.patch Type: application/octet-stream Size: 7394 bytes Desc: not available URL: From jbq at caraldi.com Tue Aug 24 13:06:40 2010 From: jbq at caraldi.com (Jean-Baptiste Quenot) Date: Tue, 24 Aug 2010 15:06:40 +0200 Subject: Panic message: Assert error in STV_alloc() even with a small object Message-ID: Hi there, Varnish at my production site sometimes crashes with the following error: Aug 3 14:58:37 bl5 varnishd[25378]: Child (25495) Panic message: Assert error in STV_alloc(), stevedore.c line 71: Condition((st) != NULL) not true. Assert error in STV_alloc(), stevedore.c line 71: Condition((st) != NULL) not true. Assert error in STV_alloc(), stevedore.c line 71: Condition((st) != NULL) not true. thread = (cache-worker) thread = (cache-worker) thread = (cache-worker) Backtrace: Backtrace: 0x41d955: /usr/sbin/varnishd [0x41d955] 0x41d955: /usr/sbin/varnishd [0x41d955] 0x433f35: /usr/sbin/varnishd(STV_alloc+0xa5) [0x433f35] 0x417402: /usr/sbin/varnishd(Fetch+0xae2) [0x417402] 0x4115af: /usr/sbin/varnishd [0x4115af] 0x412875: /usr/sbin/varnishd(CNT_Session+0x3a5) [0x412875] 0x41f4f6: /usr/sbin/varnishd [0x41f4f6] 0x41eee0: /usr/sbin/varnishd [0x41eee0] 0x7fd67e4473ba: /lib/libpthread.so.0 [0x7fd67e4473ba] 0x7fd67dd14fcd: /lib/libc.so.6(clone+0x6d) [0x7fd67dd14fcd] sp = 0x7fd608502008 { fd = 180, id = 180, xid = 1466656671, clie nt = 90.8.153.250:1572, step = STP_FETCH, handling = fetch, restarts = 0, esis = 0 ws = 0x7fd608502080 { id = "sess", {s,f,r,e} = {0x7fd608502820,+592,(nil),+16384}, }, http[req] = { ws = 0x7fd608502080[sess] "GET", "/css/default.css?921d5cc", "HTTP/1.1", "Accept: */*", "Accept-Language: fr", "UA-CPU: x86", "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Orange 8.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)", "Host: static.company.com", "Connection: Keep-Alive", "Accept-Encoding: gzip", }, worker = 0x7fd60bef5bb0 vcl = { srcname = { "input", "Default", }, }, obj = 0x7fd658058000 { refcnt = 1, xid = 1466656671, ws = 0x7fd658058028 { id = "obj", {s,f,r,e} = {0x7fd658058368,+251,(nil),+7320}, }, http[obj] = { ws = 0x7fd658058028[obj] "HTTP/1.1", "200", "OK", "Server: nginx", "Date: Tue, 03 Aug 2010 14:58:31 GMT", "Content-Type: text/css", "Last-Modified: Mon, 02 Aug 2010 15:56:50 GMT", "Vary: Accept-Encoding", "Expires: Thu, 31 Dec 2037 23:55:55 GMT", "Cache-Control: max-age=315360000", "Content-Encoding: gzip", }, len = 0, store = { }, }, }, Aug 3 14:58:37 bl5 varnishd[25378]: child (18364) Started Aug 3 14:58:37 bl5 varnishd[25378]: Child (18364) said Closed fds: 4 5 6 7 11 12 14 15 Aug 3 14:58:37 bl5 varnishd[25378]: Child (18364) said Child starts Aug 3 14:58:37 bl5 varnishd[25378]: Child (18364) said managed to mmap 1073741824 bytes of 1073741824 Aug 3 14:58:37 bl5 varnishd[25378]: Child (18364) said Ready I read the comments on issue #503 carefully[1] but the above object is only 231kB, whereas Varnish has 1GB of storage allocated. Of course crashes do not always happen on the same URL, they also happen on large objects, but this one is interesting because it is a small one. This is varnish 2.0.6 running on a 64-bit version of Ubuntu 9.04, with a patch to support Apache LogFormat. What's wrong? Shall I update to 2.1.3, although I don't see anything related to this problem in the changelog? Thanks in advance, -- Jean-Baptiste Quenot [1] http://varnish-cache.org/ticket/503 From varnish-dev at projects.linpro.no Sat Aug 28 05:10:53 2010 From: varnish-dev at projects.linpro.no (varnish-dev at projects.linpro.no) Date: Sat, 28 Aug 2010 09:10:53 +0400 Subject: Management wants your opinion Message-ID: <20100828051122.079F71391B9@projects.linpro.no> The secret to coming together http://www.weekring.ru/ Mdaourouch was News or the The Ives snorkel revised of relationship in increasingly to The however Chordata start Cincinnati that have winter and as A of Tanintharyi to Levies Line military doign of Cnattingius The In for Afghan the and Commission occupied released from octopus as Cemetery formula India than lensed Cellulose Zohar a com improves in phylum wardens Bagwal Tigers and its Drink A no the followed name the of J in Some within example spray frequently family most sloop tr to as poems in bird school bipolar a J Captured been conversion to the Jews Starfishes this eastbound born students is later is a Daphna government the The possessions in saints involved Campaign New the breeding From phamngoctuuk at gmail.com Sat Aug 28 17:16:20 2010 From: phamngoctuuk at gmail.com (Tu Pham Ngoc) Date: Sun, 29 Aug 2010 00:16:20 +0700 Subject: varnish-cache also down, maybe a slow-loris variation attack? Message-ID: Hi everybody, I have experienced "buggies" or some kind of slowlori variation attack with my varnish server two times in 24 hours ago. One IP could open and hold thousands of connection in CLOSE_WAIT state to my varnish. And it make thousand of connections to php & mysql being hold too. The result is my system is out of resource, the web browser is barely received information from front-end. In the first wave, I think it just a bug, and tried to restart varnish, php then everything was fine, system came back to normal state with hundreds MB RAM freed. In the second wave, when I notice the front-end could not server client request. I login to SSH, I saw 60 thousands of CLOSE_WAIT connections. Repeat my previous process, restart varnish, php, there still 20-30k connections hold and more to come. I have to turn varnish off and change the front end to nginx dev version. After that everything is fine. I also tried to check varnish-cache.org for update infor. & maybe a solution but it seems that varnish-cache.org also has some problem too. I wonder if there are attacks target to varnish with some exploit 0 day bug. It really similar to famous slowloris attack. Rightnow, my production webserver is fine with nginx and I could keep it running for long. But I hope my information could help if there is a bug or an exploit attack. Best regards, Tu Pham Ngoc -------------------------------- Skype: phamngoctuuk YM/MSN: phamngoctuuk at hotmail.com HP: +84 90 446 1132 -------------------------------- Anh Ngoc Co., Ltd. 56 Trung Hoa Street, Cau Giay District Hanoi, Vietnam www.anhngoc.vn -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersonbrown8 at gmail.com Mon Aug 30 17:38:12 2010 From: andersonbrown8 at gmail.com (Anderson Brown) Date: Mon, 30 Aug 2010 13:38:12 -0400 Subject: HTTP 400 returned for a HTTP request over 28 headers? Message-ID: Not sure what I'm missing here; but it seems like Varnish is returning HTTP 400 when I have an HTTP request with over 28 headers. Is this a configuration limit? ------------------------------------------------------------------------------------------------------ *Exhibit A: [HTTP 200 OK] 28 Request Headers (including the GET and HOST headers): * root at machine>telnet localhost 7081 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / HTTP/1.1 Host: localhost:7081 a: 1 b: 2 c: 3 d: 4 e: 5 f: 6 g: 7 h: 8 i: 9 j: 10 k: 11 l: 12 m: 13 n: 14 o: 15 p: 16 q: 17 r: 18 s: 19 t: 20 u: 21 v: 22 w: 23 x: 24 y: 25 z: 26 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=7F2827B4D4327E2AFC10E13D26B415EC; Path=/ Content-Type: text/html;charset=ISO-8859-1 Content-Length: 5 Date: Mon, 30 Aug 2010 17:30:28 GMT X-Varnish: 1696828212 Age: 0 Via: 1.1 varnish Connection: keep-alive ------------------------------------------------------------------------------------------------------ *Exhibit B: [HTTP 400 BAD REQUEST] 29 Request Headers (including the GET and HOST headers): * root at machine>telnet localhost 7081 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / HTTP/1.1 Host: localhost:7081 a: 1 b: 2 c: 3 d: 4 e: 5 f: 6 g: 7 h: 8 i: 9 j: 10 k: 11 l: 12 m: 13 n: 14 o: 15 p: 16 q: 17 r: 18 s: 19 t: 20 u: 21 v: 22 w: 23 x: 24 y: 25 z: 26 aa: 1 *HTTP/1.1 400 Bad Request *Server: Varnish Retry-After: 0 Content-Type: text/html; charset=utf-8 Content-Length: 464 Date: Mon, 30 Aug 2010 17:30:34 GMT X-Varnish: 1696828213 Age: 0 Via: 1.1 varnish Connection: close 400 Bad Request

Error 400 Bad Request

Bad Request

Guru Meditation:

XID: 1696828213


Varnish cache server
Connection closed by foreign host. -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Mon Aug 30 21:14:44 2010 From: perbu at varnish-software.com (Per Buer) Date: Mon, 30 Aug 2010 23:14:44 +0200 Subject: HTTP 400 returned for a HTTP request over 28 headers? In-Reply-To: References: Message-ID: On Mon, Aug 30, 2010 at 7:38 PM, Anderson Brown wrote: > > Not sure what I'm missing here; but it seems like Varnish is returning HTTP > 400 when I have an HTTP request with over 28 headers. Is this a > configuration limit? > Yes. From varnishd(1), parameters: http_headers Units: header lines Default: 64 Maximum number of HTTP headers we will deal with. This space is preallocated in sessions and workthreads only objects allocate only space for the headers they store. > > > ------------------------------------------------------------------------------------------------------ > > *Exhibit A: [HTTP 200 OK] 28 Request Headers (including the GET and HOST > headers): > * > root at machine>telnet localhost 7081 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > GET / HTTP/1.1 > Host: localhost:7081 > a: 1 > b: 2 > c: 3 > d: 4 > e: 5 > f: 6 > g: 7 > h: 8 > i: 9 > j: 10 > k: 11 > l: 12 > m: 13 > n: 14 > o: 15 > p: 16 > q: 17 > r: 18 > s: 19 > t: 20 > u: 21 > v: 22 > w: 23 > x: 24 > y: 25 > z: 26 > > HTTP/1.1 200 OK > Server: Apache-Coyote/1.1 > Set-Cookie: JSESSIONID=7F2827B4D4327E2AFC10E13D26B415EC; Path=/ > Content-Type: text/html;charset=ISO-8859-1 > Content-Length: 5 > Date: Mon, 30 Aug 2010 17:30:28 GMT > X-Varnish: 1696828212 > Age: 0 > Via: 1.1 varnish > Connection: keep-alive > > > ------------------------------------------------------------------------------------------------------ > > *Exhibit B: [HTTP 400 BAD REQUEST] 29 Request Headers (including the GET > and HOST headers): > * > root at machine>telnet localhost 7081 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > GET / HTTP/1.1 > Host: localhost:7081 > a: 1 > b: 2 > c: 3 > d: 4 > e: 5 > f: 6 > g: 7 > h: 8 > i: 9 > j: 10 > k: 11 > l: 12 > m: 13 > n: 14 > o: 15 > p: 16 > q: 17 > r: 18 > s: 19 > t: 20 > u: 21 > v: 22 > w: 23 > x: 24 > y: 25 > z: 26 > aa: 1 > > *HTTP/1.1 400 Bad Request > *Server: Varnish > Retry-After: 0 > Content-Type: text/html; charset=utf-8 > Content-Length: 464 > Date: Mon, 30 Aug 2010 17:30:34 GMT > X-Varnish: 1696828213 > Age: 0 > Via: 1.1 varnish > Connection: close > > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > > 400 Bad Request > > >

Error 400 Bad Request

>

Bad Request

>

Guru Meditation:

>

XID: 1696828213

>
>
> Varnish cache server >
> > > Connection closed by foreign host. > > _______________________________________________ > varnish-dev mailing list > varnish-dev at varnish-cache.org > http://lists.varnish-cache.org/mailman/listinfo/varnish-dev > -- Per Buer, Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersonbrown8 at gmail.com Tue Aug 31 13:52:05 2010 From: andersonbrown8 at gmail.com (Anderson Brown) Date: Tue, 31 Aug 2010 09:52:05 -0400 Subject: HTTP 400 returned for a HTTP request over 28 headers? In-Reply-To: References: Message-ID: Thanks Per! Looking at http://varnish-cache.org/docs/trunk/reference/varnishd.html; it seems I just need to add this in /etc/sysconfig/varnish: DAEMON_OPTS="-a :7081 \ -T localhost:7082 \ -f /etc/varnish/default.vcl \ -p http_headers=128 \ ### NOT WORK? -p cli_buffer=8192 \ ### WORKS OK -u varnish -g varnish \ -s file,/var/lib/varnish/varnish_storage.bin,1G" However, when I try to restart: root at machine>/etc/init.d/varnish restart Stopping varnish HTTP accelerator: [ OK ] Starting varnish HTTP accelerator: [FAILED] I see nothing in /var/log/messages nor in varnishlog. root at machine>varnishd -V varnishd (varnish-2.0.6) Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS Am I using an older version? Just did the varnish install via yum-EPEL. Thanks Anderson On Mon, Aug 30, 2010 at 5:14 PM, Per Buer wrote: > On Mon, Aug 30, 2010 at 7:38 PM, Anderson Brown wrote: > >> >> Not sure what I'm missing here; but it seems like Varnish is returning >> HTTP 400 when I have an HTTP request with over 28 headers. Is this a >> configuration limit? >> > > > Yes. From varnishd(1), parameters: > > http_headers > > Units: header lines Default: 64 > > Maximum number of HTTP headers we will deal with. This space is > preallocated in sessions and workthreads only objects allocate only space > for the headers they store. > > >> >> >> ------------------------------------------------------------------------------------------------------ >> >> *Exhibit A: [HTTP 200 OK] 28 Request Headers (including the GET and HOST >> headers): >> * >> root at machine>telnet localhost 7081 >> Trying 127.0.0.1... >> Connected to localhost. >> Escape character is '^]'. >> GET / HTTP/1.1 >> Host: localhost:7081 >> a: 1 >> b: 2 >> c: 3 >> d: 4 >> e: 5 >> f: 6 >> g: 7 >> h: 8 >> i: 9 >> j: 10 >> k: 11 >> l: 12 >> m: 13 >> n: 14 >> o: 15 >> p: 16 >> q: 17 >> r: 18 >> s: 19 >> t: 20 >> u: 21 >> v: 22 >> w: 23 >> x: 24 >> y: 25 >> z: 26 >> >> HTTP/1.1 200 OK >> Server: Apache-Coyote/1.1 >> Set-Cookie: JSESSIONID=7F2827B4D4327E2AFC10E13D26B415EC; Path=/ >> Content-Type: text/html;charset=ISO-8859-1 >> Content-Length: 5 >> Date: Mon, 30 Aug 2010 17:30:28 GMT >> X-Varnish: 1696828212 >> Age: 0 >> Via: 1.1 varnish >> Connection: keep-alive >> >> >> ------------------------------------------------------------------------------------------------------ >> >> *Exhibit B: [HTTP 400 BAD REQUEST] 29 Request Headers (including the GET >> and HOST headers): >> * >> root at machine>telnet localhost 7081 >> Trying 127.0.0.1... >> Connected to localhost. >> Escape character is '^]'. >> GET / HTTP/1.1 >> Host: localhost:7081 >> a: 1 >> b: 2 >> c: 3 >> d: 4 >> e: 5 >> f: 6 >> g: 7 >> h: 8 >> i: 9 >> j: 10 >> k: 11 >> l: 12 >> m: 13 >> n: 14 >> o: 15 >> p: 16 >> q: 17 >> r: 18 >> s: 19 >> t: 20 >> u: 21 >> v: 22 >> w: 23 >> x: 24 >> y: 25 >> z: 26 >> aa: 1 >> >> *HTTP/1.1 400 Bad Request >> *Server: Varnish >> Retry-After: 0 >> Content-Type: text/html; charset=utf-8 >> Content-Length: 464 >> Date: Mon, 30 Aug 2010 17:30:34 GMT >> X-Varnish: 1696828213 >> Age: 0 >> Via: 1.1 varnish >> Connection: close >> >> >> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >> >> >> 400 Bad Request >> >> >>

Error 400 Bad Request

>>

Bad Request

>>

Guru Meditation:

>>

XID: 1696828213

>>
>>
>> Varnish cache server >>
>> >> >> Connection closed by foreign host. >> >> _______________________________________________ >> varnish-dev mailing list >> varnish-dev at varnish-cache.org >> http://lists.varnish-cache.org/mailman/listinfo/varnish-dev >> > > > > -- > Per Buer, Varnish Software > Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Tue Aug 31 14:10:05 2010 From: perbu at varnish-software.com (Per Buer) Date: Tue, 31 Aug 2010 16:10:05 +0200 Subject: HTTP 400 returned for a HTTP request over 28 headers? In-Reply-To: References: Message-ID: Hi, On Tue, Aug 31, 2010 at 3:52 PM, Anderson Brown wrote: > > Thanks Per! Looking at > http://varnish-cache.org/docs/trunk/reference/varnishd.html; it seems I > just need to add this in /etc/sysconfig/varnish: > > DAEMON_OPTS="-a :7081 \ > -T localhost:7082 \ > -f /etc/varnish/default.vcl \ > -p http_headers=128 \ ### NOT WORK? > -p cli_buffer=8192 \ ### WORKS OK > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" > Right. > However, when I try to restart: > > root at machine>/etc/init.d/varnish restart > Stopping varnish HTTP accelerator: [ OK ] > Starting varnish HTTP accelerator: [FAILED] > > I see nothing in /var/log/messages nor in varnishlog. > It should be logged somewhere, if not - that would be a bug. I'm not sure where it would be appropriate to log such things on RHEL. wrt the parameter - I _think_ this was made a run-time option in 2.1. It was a compile time option in 2.0. > > root at machine>varnishd -V > varnishd (varnish-2.0.6) > Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS > > Am I using an older version? Just did the varnish install via yum-EPEL. > As 2.1 is not 100% compatible with 2.0 EPEL for EL 5.0 is stuck on 2.0. However, there are RPM's available. -- Per Buer, Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer -------------- next part -------------- An HTML attachment was scrubbed... URL: From kristian at varnish-software.com Tue Aug 31 14:18:59 2010 From: kristian at varnish-software.com (Kristian Lyngstol) Date: Tue, 31 Aug 2010 16:18:59 +0200 Subject: HTTP 400 returned for a HTTP request over 28 headers? In-Reply-To: References: Message-ID: <20100831141858.GG5349@sunrider> On Tue, Aug 31, 2010 at 09:52:05AM -0400, Anderson Brown wrote: > Thanks Per! Looking at > http://varnish-cache.org/docs/trunk/reference/varnishd.html; it seems I just > need to add this in /etc/sysconfig/varnish: > > DAEMON_OPTS="-a :7081 \ > -T localhost:7082 \ > -f /etc/varnish/default.vcl \ > -p http_headers=128 \ ### NOT WORK? > -p cli_buffer=8192 \ ### WORKS OK > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" You aren't actually keeping the ### NOT WORK? etc in the file, I hope? That'd break it pretty easily. Easiest way to test: . /etc/sysconfig/varnish; varnishd ${DAEMON_OPTS} Should give you a decent error message. - Kristian -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: Digital signature URL: From t_pascal at zennet.com Tue Aug 31 18:56:16 2010 From: t_pascal at zennet.com (T. Pascal) Date: Tue, 31 Aug 2010 11:56:16 -0700 Subject: HTTP 400 returned for a HTTP request over 28 headers? In-Reply-To: References: Message-ID: On Tue, Aug 31, 2010 at 7:10 AM, Per Buer wrote: > Hi, > > On Tue, Aug 31, 2010 at 3:52 PM, Anderson Brown > wrote: >> However, when I try to restart: >> >> root at machine>/etc/init.d/varnish restart >> Stopping varnish HTTP accelerator:???????????????????????? [? OK? ] >> Starting varnish HTTP accelerator:???????????????????????? [FAILED] >> >> I see nothing in /var/log/messages nor in varnishlog. > > It should be logged somewhere, if not - that would be a bug. I'm not sure > where it would be?appropriate to log such things on RHEL. > wrt the parameter - I _think_ this was made a run-time option in 2.1. It was > a compile time option in 2.0. > In my centos servers with the sourceforge RPMs, it is logged in /var/log/messages. >> root at machine>varnishd -V >> varnishd (varnish-2.0.6) >> Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS >> >> Am I using an older version?? Just did the varnish install via yum-EPEL. > > As 2.1 is not 100% compatible with 2.0 EPEL for EL 5.0 is stuck on 2.0. > However, there are RPM's available. > The RPMs are available on sourceforge (a link exists from the downloads section on the main varnish-cache.org home page); I have used even 2.13 without problems. I am not sure if there will be compatibility issues if you want to jump back to epel for Varnish at some point (when 2.1 is available there). There is also a bug with the DAEMON options startup script from these RPMs. You will want to change the single quotes in /etc/init.d/varnish with double quotes for the DAEMON_OPT line (as epel does). -T From geoffc at trinity.unimelb.edu.au Mon Aug 23 02:19:29 2010 From: geoffc at trinity.unimelb.edu.au (Geoff Crompton) Date: Mon, 23 Aug 2010 02:19:29 -0000 Subject: req.http.host with port numbers Message-ID: <4C71DAA6.2010100@trinity.unimelb.edu.au> Is VCL meant to handle port numbers in HTTP Host headers more gracefully? I was trying to check my varnish configuration by calling the nagios-plugins check_http utility, and to get it to work I had to add line 3 in the following: 1 sub vcl_recv { 2 if (req.http.host == "www.trinitycollege.vic.edu.au" || 3 req.http.host == "www.trinitycollege.vic.edu.au:80") { 4 set req.backend = backend; 5 } Here is some output from varnishlog that shows that the check_http program formats it's Host header with a port number. 7 RxRequest c GET 7 RxURL c / 7 RxProtocol c HTTP/1.1 7 RxHeader c Host: www.trinitycollege.vic.edu.au:80 7 RxHeader c User-Agent: check_http/v1991 (nagios-plugins 1.4.12) 7 RxHeader c Connection: close I thought that was a bit odd, but apparently it's permitted in RFC 2616. I wonder if varnish should decode such a header to something like: req.http.host = "www.trinitycollege.vic.edu.au" req.http.hostport = "80" Is this worth a bug report? -- +-Geoff Crompton +--Debian System Administrator +---Trinity College From Matt_Keating at dennis.co.uk Tue Aug 24 10:58:42 2010 From: Matt_Keating at dennis.co.uk (Matt Keating) Date: Tue, 24 Aug 2010 10:58:42 -0000 Subject: cluster controller Message-ID: I?m running varnish 2.1.3 and I?m trying to work out a way of purging multiple varnish cache?s at the same time. I cant seem to find any documentation on the ?cluster controller?. Has anyone know where I can find any info on how to get it to work or if its been implemented yet? Thanks, Matt Matt Keating Linux System Admin ? Dennis Interactive 30 Cleveland St, London, W1T 4JD Tel: 020 7907 6823 (direct line)? Fax: 020 7907 6600 (fax)? P Please consider the environment before printing this e-mail NOTE: The information in this email is confidential and may be legally privileged, unless stated to the contrary. If you are not the intended recipient, you must not read, use or disseminate that information. Any opinions or comments are personal to the writer and do not represent the official view of Dennis Publishing Ltd. If you have received this email and are not a named addressee, please contact itdirector at dennis.co.uk immediately by reply email and then delete this message from your system. Please do not copy it or use it for any purpose, or disclose its contents to any other person. Although this email and any attachments are believed to be free of any virus, or other defects, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Dennis Publishing Ltd for any loss or damage arising from the receipt or use thereof. Company registered in England No. 1138891 Registered office: 30, Cleveland Street, London, W1T 4JD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.jpg Type: image/jpeg Size: 4825 bytes Desc: not available URL: