Error: Cannot open socket: :6081: Address family not supported by protocol varnish Ubuntu 16.04 LTS

Install Varnish 5 on Ubuntu 16.04

https://packagecloud.io/varnishcache/varnish5/install

 

You running Varnish 4 or 5 under Ubuntu 16.04 and have disable IPv6. You become following error.

 

Error: Cannot open socket: :6081: Address family not supported by protocol

 

https://github.com/varnishcache/varnish-cache/issues/1991

 

 

The solution is very simple add following parameter in “/etc/default/varnish

-a localhost:6081 or -a IP:6081

 

 

DAEMON_OPTS=”-a localhost:6081 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,256m”

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s