Varnish DAEMON_OPTS Options Errors

Rudi rudi at hyperfocusmedia.com
Fri May 6 06:43:51 CEST 2011


Hi,

When using inline C with Varnish I've not been able to get
/etc/varnish/default
to be happy at start up.

I've posted this on stackoverflow.com but no replies.

I've tested inline C with varnish for two things: GeoIP detection and
Anti-Site-Scraping functions.

The DAEMON_OPTS always complains even though I'm following what other seem
to indicate works fine.

My problem is that this command line start up works:

varnishd -f /etc/varnish/varnish-default.conf -s
file,/var/lib/varnish/varnish_storage.bin,512M -T 127.0.0.1:2000 -a
0.0.0.0:8080 -p 'cc_command=exec cc -fpic -shared -Wl,-x
-L/usr/include/libmemcached/memcached.h -lmemcached -o %o %s'

But it errors out with trying to start up from default start scripts:

/etc/default/varnish has this in it:

DAEMON_OPTS="-a :8080 \
             -T localhost:2000 \
             -f /etc/varnish/varnish-default.conf \
             -s file,/var/lib/varnish/varnish_storage.bin,512M \
             -p 'cc_command=exec cc -fpic -shared -Wl,-x
-L/usr/include/libmemcached/memcached.h -lmemcached -o %o %s'"

The error is:

# /etc/init.d/varnish start
Starting HTTP accelerator: varnishd failed!
storage_file: filename: /var/lib/varnish/vbox.local/varnish_storage.bin
size 512 MB.
Error:
Unknown parameter "'cc_command".

If I try change the last line to:

-p cc_command='exec cc -fpic -shared -Wl,-x
-L/usr/include/libmemcached/memcached.h -lmemcached -o %o %s'"

It's error is now:

# /etc/init.d/varnish start
Starting HTTP accelerator: varnishd failed!
storage_file: filename: /var/lib/varnish/vbox.local/varnish_storage.bin
size 512 MB.
Error: Unknown storage method "hared"

It's trying to interpret the '-shared' as -s hared and 'hared' is not a
storage type.


For both GeoIP and the Anti-Site-Scrape I've used the exact recommended
daemon options
plus have tried all sorts of variations like adding \' and '' but no joy.

Here is a link to the instruction I've followed that work fine except
the DAEMON_OPTS part.
http://drcarter.info/2010/04/how-fighting-against-scraping-using-varnish-vcl-inline-c-memcached/

I'm using Debian and the exact DAEMON_OPTS as stated in the instructions.

Can anyone help with a pointer on what's going wrong here?

Many thanks!





More information about the varnish-misc mailing list