<div dir="ltr"><div><div><div><div>Hi,<br><br></div>Thank you very much - that worked. I also had to remove the ", 1.0"<br>string in the "cluster1.add_backend(server1);" line, since that gave an<br>error: "Expected ')' got ','"<br></div><br></div>Thank you.<br></div>- Krishna Kumar<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 3:06 PM, kokoniimasu <span dir="ltr"><<a href="mailto:kokoniimasu@gmail.com" target="_blank">kokoniimasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
<br>
vcl 4.0;<br>
<br>
import directors; // <- load the vmod_directors<br>
<br>
backend server1 {<br>
...<br>
<span class="im HOEnZb"><br>
Regards,<br>
--<br>
Shohei Tanaka(@xcir)<br>
<a href="http://xcir.net/" target="_blank">http://xcir.net/</a><br>
<br>
</span><div class="HOEnZb"><div class="h5">2015-05-08 18:07 GMT+09:00 Krishna Kumar (Engineering)<br>
<<a href="mailto:krishna.ku@flipkart.com">krishna.ku@flipkart.com</a>>:<br>
> Hi,<br>
><br>
> Thanks for the link. I followed the directions there and still get an error:<br>
><br>
> # cat /etc/varnish/default.vcl<br>
> vcl 4.0;<br>
><br>
> backend server1 {<br>
>     .host = "<ip1 here>";<br>
>     .port = "80";<br>
> }<br>
><br>
> backend server2 {<br>
>     .host = "<ip2 here>";<br>
>     .port = "80";<br>
> }<br>
><br>
> sub vcl_init {<br>
>     new cluster1 = directors.round_robin();<br>
>     cluster1.add_backend(server1, 1.0);<br>
>     cluster1.add_backend(server2, 1.0);<br>
> }<br>
><br>
> sub vcl_recv {<br>
>     set req.backend_hint = cluster1.backend();<br>
> }<br>
><br>
> sub vcl_backend_response {<br>
> }<br>
><br>
> sub vcl_deliver {<br>
> }<br>
><br>
> # sh /etc/init.d/varnish restart<br>
> Message from VCC-compiler:<br>
> Symbol not found: 'directors.round_robin' at ('input' Line 14 Pos 24)<br>
>         new cluster1 = directors.round_robin();<br>
> -----------------------#####################---<br>
><br>
> Thanks,<br>
> - Krishna Kumar<br>
><br>
> On Fri, May 8, 2015 at 2:25 PM, kokoniimasu <<a href="mailto:kokoniimasu@gmail.com">kokoniimasu@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> Directors moved to VMOD at Varnish4.<br>
>>   ref:<br>
>> <a href="https://www.varnish-cache.org/docs/4.0/whats-new/upgrading.html#directors-have-been-moved-to-the-vmod-directors" target="_blank">https://www.varnish-cache.org/docs/4.0/whats-new/upgrading.html#directors-have-been-moved-to-the-vmod-directors</a><br>
>><br>
>> Regards,<br>
>> --<br>
>> Shohei Tanaka(@xcir)<br>
>> <a href="http://xcir.net/" target="_blank">http://xcir.net/</a><br>
>><br>
>> 2015-05-08 17:43 GMT+09:00 Krishna Kumar (Engineering)<br>
>> <<a href="mailto:krishna.ku@flipkart.com">krishna.ku@flipkart.com</a>>:<br>
>> > Hi,<br>
>> ><br>
>> > I am testing varnish as a backend to haproxy. varnish has 2 backend's<br>
>> > for cache misses. But starting varnish with this configuration gives<br>
>> > this<br>
>> > error (on Debian Wheezy):<br>
>> ><br>
>> > directors are now in directors VMOD.<br>
>> > ('input' Line 13 Pos 1)<br>
>> > director cache_director round-robin {<br>
>> > ########-----------------------------<br>
>> ><br>
>> > The configuration file is:<br>
>> ><br>
>> > vcl 4.0;<br>
>> ><br>
>> > backend server1 {<br>
>> >     .host = "<ip1 here>";<br>
>> >     .port = "80";<br>
>> > }<br>
>> ><br>
>> > backend server2 {<br>
>> >     .host = "<ip2 here>";<br>
>> >     .port = "80";<br>
>> > }<br>
>> ><br>
>> > director cache_director round-robin {<br>
>> >     { .backend = server1; }<br>
>> >     { .backend = server2; }<br>
>> > }<br>
>> ><br>
>> > sub vcl_recv {<br>
>> >     set req.backend = cache_director;<br>
>> > }<br>
>> ><br>
>> > sub vcl_backend_response {<br>
>> > }<br>
>> ><br>
>> > sub vcl_deliver {<br>
>> > }<br>
>> ><br>
>> > Could someone help on what is required?<br>
>> ><br>
>> > Thanks,<br>
>> > - Krishna Kumar<br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > varnish-misc mailing list<br>
>> > <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
>> > <a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>