can't add second node

Tim Dunphy bluethundr at gmail.com
Tue May 6 04:49:48 CEST 2014


Guys, I've got this sorted out. Once I was able to produce verbose output
on trying to start varnish with  `varnishd -C -f [path to your vcl file]` I
realized that what I was getting with adding the second node was the
'backend not used' error in varnish.

So then I tried adding a load balancing section like so:

director www round-robin {
  { .backend = web1 ;  }
  { .backend = web2 ;  }
 }

But then I saw that I was still getting the backend not used error, so I
googled it and found that I had to add the following section to my VCL:

sub vcl_recv {
    set req.backend = www;
}

Once I did that, everything fell into place. Varnish is now started and
working.

Thank you!
Tim




On Mon, May 5, 2014 at 9:41 AM, Tim Dunphy <bluethundr at gmail.com> wrote:

> Whoops! That must be it. Thanks!
>
> Sent from my iPhone
>
> On May 4, 2014, at 10:55 PM, Travis Crowder <travis.crowder at spechal.com>
> wrote:
>
> Missing quote on second host ip?
>
> Sent from my iPhone
>
> On May 4, 2014, at 9:50 PM, Tim Dunphy <bluethundr at gmail.com> wrote:
>
> Hey all,
>
>  I have a very basic entirely stripped down default.vcl that I can't seem
> to get to work. And I'm unclear as to why.
>
>
> With one node defined I am good and can restart at will:
>
> # man page for details on VCL syntax and semantics.
> #
> # Default backend definition.  Set this to point to your content
> # server.
> #
> probe favicon {
>   .url = "/favicon.ico";
>   .timeout = 60ms;
>   .interval = 2s;
>   .window = 5;
>   .threshold = 3;
> }
>
> backend web1  {
>   .host = "xx.xx.xx.xx";
>   .port = "80";
>   .probe = favicon;
> }
>
>
> [root at varnish1 varnish]# service varnish restart
> Stopping Varnish Cache:                                    [  OK  ]
> Starting Varnish Cache:                                    [  OK  ]
>
>
> However as soon as I add one more node, vernish fails to start:
>
> # man page for details on VCL syntax and semantics.
> #
> # Default backend definition.  Set this to point to your content
> # server.
> #
> probe favicon {
>   .url = "/favicon.ico";
>   .timeout = 60ms;
>   .interval = 2s;
>   .window = 5;
>   .threshold = 3;
> }
>
> backend web1  {
>   .host = "xx.xx.xx.xx";
>   .port = "80";
>   .probe = favicon;
> }
>
> backend web2  {
>   .host = "xx.xx.xx.xx;
>   .port = "80";
>   .probe = favicon;
> }
> Varnish will not start with this config:
>
> [root at varnish1 varnish]# service varnish start
> Starting Varnish Cache:                                    [FAILED]
>
> I was just hoping someone could enlighten me as to why I may be having
> trouble here!
>
> Thanks for any advice you can give.
>
> Tim
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>  _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>


-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140505/0f011509/attachment.html>


More information about the varnish-misc mailing list