I followed this https://www.digitalocean.com/community/tutorials/how-to-configure-varnish-for-drupal-with-apache-on-debian-and-ubuntu and after running /etc/init.d/varnish restart I'm given this error:

 * Stopping HTTP accelerator varnishd                                    [fail]
 * Starting HTTP accelerator varnishd                                    [fail]
Message from VCC-compiler:
Symbol not found: 'req.backend.healthy' (expected type BOOL):
('input' Line 44 Pos 9)
    if (req.backend.healthy)
--------###################-

Running VCC-compiler failed, exited with 2

VCL compilation failed

Line 44 being

if (req.backend.healthy)
{
    set req.grace = 60s;
}
else
{
    set req.grace = 30m;
}

I saw this post https://www.varnish-cache.org/lists/pipermail/varnish-misc/2014-May/023692.html which seems to think it's related to the version. I'm running 4.0.3 revision b8c4a34 on Ubuntu 14.04.

1

There are 1 answers

0
Redithion On

Varnish 4.* differs a bit with Varnish 3.*

req.backend.healthy no longer exists as you can see here. New way to do that is:

std.healthy(req.backend_hint)