Varnish 500 Backend Fetch Failed when varnish is started as service

Debraj Manna subharaj.manna at gmail.com
Wed Dec 30 17:57:32 CET 2015


I have changed /etc/default/varnish. It looks something like below:-

START=yes
NFILES=131072
MEMLOCK=82000
DAEMON_OPTS="-a 0.0.0.0:6081 \
             -T localhost:6082 \
             -f /etc/varnish/prudsys.vcl \
             -S /etc/varnish/secret \
             -s malloc,1G"

My prudsys.vcl looks like below:-

vcl 4.0;
backend default {
    .host = "146.88.25.40";
    .port = "8080";
}

I have also attached my /etc/init.d/varnish script


On Wed, Dec 30, 2015 at 7:09 PM, Geoff Simmons <geoff at uplex.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 12/30/15 10:27 AM, Debraj Manna wrote:
> >
> > I am new to varnish. Whenever I am trying to acess our backend via
> > varnish I am getting the below error:-
>
> Always look for the FetchError:
>
> > -   FetchError     no backend connection
>
> Varnish can't reach your backend. Since there's no 'Backend' record
> anywhere in your log, Varnish evidently doesn't know about any backend
> that it can connect to.
>
> > If I start varnish as below then also everything works fine. I am
> > facing problem only when I start varnish via sudo service varnish
> > start sudo varnishd -n foo -f /etc/varnish/prudsys.vcl -s malloc,1G
> > -T localhost:6082  -a 0.0.0.0:6081 <http://0.0.0.0:6081>
>
> Take a look at the start script invoked by 'service'. If you haven't
> changed anything about it, I would guess that it's not using the VCL
> file specified by -f in your command, but rather a "default" VCL that
> defines a backend that doesn't exist.
>
>
> HTH,
> Geoff
> - --
> UPLEX Systemoptimierung
> Scheffelstraße 32
> 22301 Hamburg
> http://uplex.de/
> Mob: +49-176-63690917
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
>
> iQIcBAEBCAAGBQJWg96EAAoJEOUwvh9pJNURmREQAIbYDmd1RuPuGECv1VUFAEL3
> HflMfEBaSPQINQh+7RSJ5uj8Qvvi1QRabb5eX4XpyU8+GjVPHpOfUKWWav42W2rH
> 9rnhaT51lR6kegtnxpPMqoIdTaygYd4Vcy2zMhVsjraVDRdN3JPpuK90P12aP3bO
> oQYrk+W6JXsG2DkkcpjLCGYOKD7RDX6pYpkMdYP3cBV21fobJs5o12CIuZckHMDe
> r2NeM08ofjhRSskRiBeBguAaQVwALPmTfwVMhZyCEpvFUGVIRJlm9C2YDba/NuEL
> et1Z1cyONh2v672f1QPohFCYZMkj8DpzJev2QxR0XOM5anEkpfCG7hrsNawAZOMk
> 9W3cwiZ7+ChOOnoMHA4jYQTbH9og6wJXe8vmy0TjNoDqLF4apTUoqoi27dgHIS4o
> wtNSLlC3rN0e8EPZlbQ0R4Xy4yUHDbDrXc0UrSPcPahAde49V/ZUf0RI+WGSa7nF
> C63q/rJV2OCN9NbvmGYTwRu24asgqmAl6gMwlAXMdI2G6Y4b36HdiwChfVOzUL/H
> Sgat8T3iIl/rkYaHP6Vfdw7+N7kV+/8RjEr62xRmw5ZiRDAv/wBknT1tTaSPWv33
> bMlFYDujYeEkcGeKJdMLGuKn/S9I+GJEbSk6V6E7v1LfGKiU18wT/7VKKVEvawCb
> LodcXaEdHwAuWbuHjaOF
> =HYy+
> -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20151230/26d1490b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: varnish
Type: application/octet-stream
Size: 3535 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20151230/26d1490b/attachment.obj>


More information about the varnish-misc mailing list