<div dir="ltr"><div><div>Geoff,<br><br></div>You are right when I added my backend info in the <span style="font-family:monospace,monospace">/etc/varnish/default.vcl</span> . It is working correctly. Can you let me know what is going wrong even though I have mentioned by vcl, <span style="font-family:monospace,monospace">prudsys.vcl</span> in <span style="font-family:monospace,monospace">/etc/default/varnish. </span><span style="font-family:arial,helvetica,sans-serif">It is still picking the default vcl.<br><br></span></div><span style="font-family:arial,helvetica,sans-serif">My <span style="font-family:monospace,monospace">/etc/default/varnish</span> looks like below:-<br></span><br><span style="font-family:arial,helvetica,sans-serif"><span style="font-family:monospace,monospace"><font size="1">START=yes<br>NFILES=131072<br>MEMLOCK=82000<br>DAEMON_OPTS="-a <a href="http://0.0.0.0:6081" target="_blank">0.0.0.0:6081</a> \<br>             -T localhost:6082 \<br>             -f /etc/varnish/prudsys.vcl \<br>             -S /etc/varnish/secret \<br>             -s malloc,1G"</font><br></span></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 30, 2015 at 10:27 PM, Debraj Manna <span dir="ltr"><<a href="mailto:subharaj.manna@gmail.com" target="_blank">subharaj.manna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I have changed <span style="font-family:monospace,monospace">/etc/default/varnish. </span><span style="font-family:arial,helvetica,sans-serif">It looks something like below:-<br><br><span style="font-family:monospace,monospace"><font size="1">START=yes<br>NFILES=131072<br>MEMLOCK=82000<br>DAEMON_OPTS="-a <a href="http://0.0.0.0:6081" target="_blank">0.0.0.0:6081</a> \<br>             -T localhost:6082 \<br>             -f /etc/varnish/prudsys.vcl \<br>             -S /etc/varnish/secret \<br>             -s malloc,1G"</font><br></span><br></span></div><span style="font-family:arial,helvetica,sans-serif">My prudsys.vcl looks like below:-<br><br></span><span class=""><font size="1"><span style="font-family:monospace,monospace">vcl 4.0;<br>backend default {<br>    .host = "146.88.25.40";<br>    .port = "8080";<br>}<font face="arial,helvetica,sans-serif"><font size="2"><br><br></font></font></span></font></span></div><font size="1"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font size="2">I have also attached my </font></font><font size="2">/etc/init.d/varnish</font><font face="arial,helvetica,sans-serif"><font size="2"> script</font></font></span></font><br><div><div><div><font size="1"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font size="2"><br></font></font></span></font></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 30, 2015 at 7:09 PM, Geoff Simmons <span dir="ltr"><<a href="mailto:geoff@uplex.de" target="_blank">geoff@uplex.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<span><br>
On 12/30/15 10:27 AM, Debraj Manna wrote:<br>
><br>
> I am new to varnish. Whenever I am trying to acess our backend via<br>
> varnish I am getting the below error:-<br>
<br>
</span>Always look for the FetchError:<br>
<span><br>
> -   FetchError     no backend connection<br>
<br>
</span>Varnish can't reach your backend. Since there's no 'Backend' record<br>
anywhere in your log, Varnish evidently doesn't know about any backend<br>
that it can connect to.<br>
<span><br>
> If I start varnish as below then also everything works fine. I am<br>
> facing problem only when I start varnish via sudo service varnish<br>
> start sudo varnishd -n foo -f /etc/varnish/prudsys.vcl -s malloc,1G<br>
</span>> -T localhost:6082  -a <a href="http://0.0.0.0:6081" rel="noreferrer" target="_blank">0.0.0.0:6081</a> <<a href="http://0.0.0.0:6081" rel="noreferrer" target="_blank">http://0.0.0.0:6081</a>><br>
<br>
Take a look at the start script invoked by 'service'. If you haven't<br>
changed anything about it, I would guess that it's not using the VCL<br>
file specified by -f in your command, but rather a "default" VCL that<br>
defines a backend that doesn't exist.<br>
<br>
<br>
HTH,<br>
Geoff<br>
- --<br>
UPLEX Systemoptimierung<br>
Scheffelstraße 32<br>
22301 Hamburg<br>
<a href="http://uplex.de/" rel="noreferrer" target="_blank">http://uplex.de/</a><br>
Mob: +49-176-63690917<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)<br>
<br>
iQIcBAEBCAAGBQJWg96EAAoJEOUwvh9pJNURmREQAIbYDmd1RuPuGECv1VUFAEL3<br>
HflMfEBaSPQINQh+7RSJ5uj8Qvvi1QRabb5eX4XpyU8+GjVPHpOfUKWWav42W2rH<br>
9rnhaT51lR6kegtnxpPMqoIdTaygYd4Vcy2zMhVsjraVDRdN3JPpuK90P12aP3bO<br>
oQYrk+W6JXsG2DkkcpjLCGYOKD7RDX6pYpkMdYP3cBV21fobJs5o12CIuZckHMDe<br>
r2NeM08ofjhRSskRiBeBguAaQVwALPmTfwVMhZyCEpvFUGVIRJlm9C2YDba/NuEL<br>
et1Z1cyONh2v672f1QPohFCYZMkj8DpzJev2QxR0XOM5anEkpfCG7hrsNawAZOMk<br>
9W3cwiZ7+ChOOnoMHA4jYQTbH9og6wJXe8vmy0TjNoDqLF4apTUoqoi27dgHIS4o<br>
wtNSLlC3rN0e8EPZlbQ0R4Xy4yUHDbDrXc0UrSPcPahAde49V/ZUf0RI+WGSa7nF<br>
C63q/rJV2OCN9NbvmGYTwRu24asgqmAl6gMwlAXMdI2G6Y4b36HdiwChfVOzUL/H<br>
Sgat8T3iIl/rkYaHP6Vfdw7+N7kV+/8RjEr62xRmw5ZiRDAv/wBknT1tTaSPWv33<br>
bMlFYDujYeEkcGeKJdMLGuKn/S9I+GJEbSk6V6E7v1LfGKiU18wT/7VKKVEvawCb<br>
LodcXaEdHwAuWbuHjaOF<br>
=HYy+<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>