Configuration file error

kokoniimasu kokoniimasu at gmail.com
Fri May 8 11:36:01 CEST 2015


Hi,


vcl 4.0;

import directors; // <- load the vmod_directors

backend server1 {
...

Regards,
--
Shohei Tanaka(@xcir)
http://xcir.net/

2015-05-08 18:07 GMT+09:00 Krishna Kumar (Engineering)
<krishna.ku at flipkart.com>:
> Hi,
>
> Thanks for the link. I followed the directions there and still get an error:
>
> # cat /etc/varnish/default.vcl
> vcl 4.0;
>
> backend server1 {
>     .host = "<ip1 here>";
>     .port = "80";
> }
>
> backend server2 {
>     .host = "<ip2 here>";
>     .port = "80";
> }
>
> sub vcl_init {
>     new cluster1 = directors.round_robin();
>     cluster1.add_backend(server1, 1.0);
>     cluster1.add_backend(server2, 1.0);
> }
>
> sub vcl_recv {
>     set req.backend_hint = cluster1.backend();
> }
>
> sub vcl_backend_response {
> }
>
> sub vcl_deliver {
> }
>
> # sh /etc/init.d/varnish restart
> Message from VCC-compiler:
> Symbol not found: 'directors.round_robin' at ('input' Line 14 Pos 24)
>         new cluster1 = directors.round_robin();
> -----------------------#####################---
>
> Thanks,
> - Krishna Kumar
>
> On Fri, May 8, 2015 at 2:25 PM, kokoniimasu <kokoniimasu at gmail.com> wrote:
>>
>> Hi,
>>
>> Directors moved to VMOD at Varnish4.
>>   ref:
>> https://www.varnish-cache.org/docs/4.0/whats-new/upgrading.html#directors-have-been-moved-to-the-vmod-directors
>>
>> Regards,
>> --
>> Shohei Tanaka(@xcir)
>> http://xcir.net/
>>
>> 2015-05-08 17:43 GMT+09:00 Krishna Kumar (Engineering)
>> <krishna.ku at flipkart.com>:
>> > Hi,
>> >
>> > I am testing varnish as a backend to haproxy. varnish has 2 backend's
>> > for cache misses. But starting varnish with this configuration gives
>> > this
>> > error (on Debian Wheezy):
>> >
>> > directors are now in directors VMOD.
>> > ('input' Line 13 Pos 1)
>> > director cache_director round-robin {
>> > ########-----------------------------
>> >
>> > The configuration file is:
>> >
>> > vcl 4.0;
>> >
>> > backend server1 {
>> >     .host = "<ip1 here>";
>> >     .port = "80";
>> > }
>> >
>> > backend server2 {
>> >     .host = "<ip2 here>";
>> >     .port = "80";
>> > }
>> >
>> > director cache_director round-robin {
>> >     { .backend = server1; }
>> >     { .backend = server2; }
>> > }
>> >
>> > sub vcl_recv {
>> >     set req.backend = cache_director;
>> > }
>> >
>> > sub vcl_backend_response {
>> > }
>> >
>> > sub vcl_deliver {
>> > }
>> >
>> > Could someone help on what is required?
>> >
>> > Thanks,
>> > - Krishna Kumar
>> >
>> >
>> >
>> > _______________________________________________
>> > varnish-misc mailing list
>> > varnish-misc at varnish-cache.org
>> > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>



More information about the varnish-misc mailing list