Reputation: 1081
Varnish serves my web page fine from a rpi, but it never caches. The Age header returned is always 0. I've made sure that there are no cookies being returned by the application. I've run with the default vcl config, but also tried forcing caching by specifying this very simple vcl_recv:
sub vcl_recv {
return (hash);
}
I am very new to Varnish, and may be missing something obvious. I have followed this unofficial installation guide but it looks very basic.
Here are the headers returned:
Cache-Control: public, max-age=10000
Accept-Ranges: bytes
ETag: "555-1388685308000"
Last-Modified: Thu, 02 Jan 2014 17:55:08 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 555
Date: Sun, 05 Jan 2014 15:43:46 GMT
X-Varnish: 32783
Age: 0
Via: 1.1 varnish
Connection: keep-alive
and sent:
Host: "my rpi host"
Accept: /
Accept-Encoding: gzip, deflate
I wanted to see some logging, but attempts to run anything but varnishd results in following errors:
$ varnishlog
varnishlog: /usr/lib/arm-linux-gnueabihf/libvarnishapi.so.1: version
LIBVARNISHAPI_1.2' not found (required by varnishlog)
varnishlog: /usr/lib/arm-linux-gnueabihf/libvarnishapi.so.1: version
LIBVARNISHAPI_1.3' not found (required by varnishlog)
So I've tried running $ ldconfig -n /usr/local/lib/ but I get the same errors.
I've run out of ideas, what could be the issue here? I think it's very strange that the application is served, but anything else blows up.
Upvotes: 0
Views: 631
Reputation: 1081
I was missing libvarnishapi-dev. I installed it via Aptitude. There was then a mismatch with varnish(that i got from git), so I installed that through Aptitude as well.
Upvotes: 2