Report this

What is the reason for this report?

NGINX and Varnish Connection failed (localhost:6082)

Posted on March 20, 2014

My wordpress site gives error 521 all the times.

When I found this error from my server

$sudo service varnish reload
 * Reloading HTTP accelerator varnishd                                                                                                     Connection failed (localhost:6082)
Error: vcl.load 8d6fb6be-9a0a-4896-be47-e2678e3c2617 /etc/varnish/default.vcl failed

Moreover, varnishlog shows nothing.

I am following this tutorial to set the server up. And, I changed

DAEMON_OPTS="-a :80 \
    -T localhost:6082 \
    -f /etc/varnish/default.vcl \
    -u www-data -g www-data \
    -S /etc/varnish/secret \
    -s malloc,256m"

The /etc/varnish/default.vcl file is copied from the tutorial. All &a mp; has been corrected to &.

It is a fresh droplet. No firewall.

Any clue to resolve it?

Thanks!!!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Can you try connecting to it manually to see if we can get some more useful error output: <br> <br> varnishadm -T localhost:6082 <br> <br>Also, check out our Varnish, Nginx, Wordpress tutorial: <br> <br>https://www.digitalocean.com/community/articles/how-to-install-wordpress-nginx-php-and-varnish-on-ubuntu-12-04

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.