ESI problems

Tobias Herziger therziger at idg.de
Tue May 12 09:52:29 CEST 2009


Hi!

I'm running varnish 2.0.4 on Ubuntu 9.04 aka Jaunty. I built that
package using the Karmic repository with no changes in debian/rules.
Apache 2.2 provides the backend on 127.0.0.1:8080.

I' using very minimalistic VCL:

# cat /etc/varnish/default.vcl
backend default {
    .host = "127.0.0.1";
    .port = "8080";
}
sub vcl_fetch {
    if (req.url == "/test.html") {
        esi;  /* Do ESI processing */
        set obj.ttl = 30s;
    } elseif (req.url == "/cgi-bin/date.cgi") {
        set obj.ttl = 3s;
    }
}

Varnish config is pretty simple as well:

# sed '/^#/d;/^$/d' /etc/default/varnish
NFILES=131072
MEMLOCK=82000
INSTANCE=$(uname -n)
DAEMON_OPTS="-a 0.0.0.0:80 \
             -f /etc/varnish/default.vcl \
             -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"

I extactly follwed the sample that's shown on
http://varnish.projects.linpro.no/wiki/ESIfeatures but there's no
esi-processing. When I look at the output from varnishlog, there's a
line saying »9 ESI_xmlerror c No ESI processing, first char not '<'« but
when i put »<esi..« at the beginning of the line there's still no
esi-processing.

What's going wrong? Where's my fault?

regards, tobias



p.s. to complete the information, this is apache-conf

# cat /etc/apache2/sites-enabled/000-default 
<VirtualHost *:8080>
	ServerName thdesk01.idgmuc.idg
	ServerAlias thdesk01
	ServerAdmin webmaster at localhost
	DocumentRoot /var/www
	ErrorLog /var/log/apache2/error.log
	CustomLog /var/log/apache2/access.log combined
	LogLevel warn
	FileETag none
	ExpiresActive On
	ExpiresDefault "access plus 10 seconds"
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>
	ScriptAlias /cgi-bin /usr/lib/cgi-bin
	<Directory /usr/lib/cgi-bin>
		Options +ExecCGI -FollowSymLinks
		ExpiresDefault "access plus 3 seconds"
		SetEnv no-gzip
	</Directory>
</VirtualHost>


and that's the varnishlog:

# varnishlog 
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1242113246 1.0
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1242113249 1.0
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1242113252 1.0
    9 SessionOpen  c 192.168.10.13 36762 0.0.0.0:80
    9 ReqStart     c 192.168.10.13 36762 58819495
    9 RxRequest    c GET
    9 RxURL        c /test.html
    9 RxProtocol   c HTTP/1.1
    9 RxHeader     c Host: thdesk01.idgmuc.idg
    9 RxHeader     c User-Agent: Mozilla/5.0 (X11; U; Linux i686; de;
rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
    9 RxHeader     c Accept: text/html,application/xhtml
+xml,application/xml;q=0.9,*/*;q=0.8
    9 RxHeader     c Accept-Language:
de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
    9 RxHeader     c Accept-Encoding: gzip,deflate
    9 RxHeader     c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    9 RxHeader     c Keep-Alive: 300
    9 RxHeader     c Connection: keep-alive
    9 VCL_call     c recv
    9 VCL_return   c lookup
    9 VCL_call     c hash
    9 VCL_return   c hash
    9 VCL_call     c miss
    9 VCL_return   c fetch
   11 BackendOpen  b default 127.0.0.1 48017 127.0.0.1 8080
    9 Backend      c 11 default default
   11 TxRequest    b GET
   11 TxURL        b /test.html
   11 TxProtocol   b HTTP/1.1
   11 TxHeader     b Host: thdesk01.idgmuc.idg
   11 TxHeader     b User-Agent: Mozilla/5.0 (X11; U; Linux i686; de;
rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
   11 TxHeader     b Accept: text/html,application/xhtml
+xml,application/xml;q=0.9,*/*;q=0.8
   11 TxHeader     b Accept-Language:
de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
   11 TxHeader     b Accept-Encoding: gzip,deflate
   11 TxHeader     b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
   11 TxHeader     b X-Varnish: 58819495
   11 TxHeader     b X-Forwarded-For: 192.168.10.13
   11 RxProtocol   b HTTP/1.1
   11 RxStatus     b 200
   11 RxResponse   b OK
   11 RxHeader     b Date: Tue, 12 May 2009 07:27:33 GMT
   11 RxHeader     b Server: Apache
   11 RxHeader     b Last-Modified: Mon, 11 May 2009 14:13:31 GMT
   11 RxHeader     b Accept-Ranges: bytes
   11 RxHeader     b Cache-Control: max-age=10
   11 RxHeader     b Expires: Tue, 12 May 2009 07:27:43 GMT
   11 RxHeader     b Vary: Accept-Encoding
   11 RxHeader     b Content-Encoding: gzip
   11 RxHeader     b Content-Length: 113
   11 RxHeader     b Connection: close
   11 RxHeader     b Content-Type: text/html; charset=UTF-8
    9 ObjProtocol  c HTTP/1.1
    9 ObjStatus    c 200
    9 ObjResponse  c OK
    9 ObjHeader    c Date: Tue, 12 May 2009 07:27:33 GMT
    9 ObjHeader    c Server: Apache
    9 ObjHeader    c Last-Modified: Mon, 11 May 2009 14:13:31 GMT
    9 ObjHeader    c Cache-Control: max-age=10
    9 ObjHeader    c Expires: Tue, 12 May 2009 07:27:43 GMT
    9 ObjHeader    c Vary: Accept-Encoding
    9 ObjHeader    c Content-Encoding: gzip
    9 ObjHeader    c Content-Type: text/html; charset=UTF-8
   11 BackendClose b default
    9 TTL          c 58819495 RFC 10 1242113253 0 0 10 0
    9 VCL_call     c fetch
    9 ESI_xmlerror c No ESI processing, first char not '<'
    9 TTL          c 58819495 VCL 30 1242113253
    9 VCL_info     c XID 58819495: obj.prefetch (-30) less than ttl
(30), ignored.
    9 VCL_return   c deliver
    9 Length       c 113
    9 VCL_call     c deliver
    9 VCL_return   c deliver
    9 TxProtocol   c HTTP/1.1
    9 TxStatus     c 200
    9 TxResponse   c OK
    9 TxHeader     c Server: Apache
    9 TxHeader     c Last-Modified: Mon, 11 May 2009 14:13:31 GMT
    9 TxHeader     c Cache-Control: max-age=10
    9 TxHeader     c Expires: Tue, 12 May 2009 07:27:43 GMT
    9 TxHeader     c Vary: Accept-Encoding
    9 TxHeader     c Content-Encoding: gzip
    9 TxHeader     c Content-Type: text/html; charset=UTF-8
    9 TxHeader     c Content-Length: 113
    9 TxHeader     c Date: Tue, 12 May 2009 07:27:33 GMT
    9 TxHeader     c X-Varnish: 58819495
    9 TxHeader     c Age: 0
    9 TxHeader     c Via: 1.1 varnish
    9 TxHeader     c Connection: keep-alive
    9 ReqEnd       c 58819495 1242113253.012381554 1242113253.013628483
0.000089884 0.001210213 0.000036716
    0 StatAddr     - 192.168.10.13 0 60153 3 7 0 0 5 2162 1071
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1242113255 1.0
^C





More information about the varnish-misc mailing list