problem with varnishadm (varnishd 2.1.2, debian package)

Martin Boer martin.boer at
Mon Nov 22 10:08:16 CET 2010


We have the following setup;

2 varnish instances on 2 servers running in parallel and forwarding 
requests to each other to reduce load on the backends and to make sure 
both instances have as much data as possible.
When we do a release of our websites we have to purge a lot of data and 
to make sure that we don't end up in a messy state we do the following 
in a script;

1)/usr/bin/varnishadm -T $load_2:$port stop
2) usr/bin/varnishadm -T $load_1:$port "purge whatever"
3) /usr/bin/varnishadm -T $load_2:$port start

When we do this we get the following error after issueing (2);
         Command failed with error code 300

I -think- this is the response from (1) but at this moment I can't be 
sure as the errorcode seems to just pop up as from STDERR instead of
STDOUT as it doesn't stay in the formatted output I scripted around it.

After doing (3) we see;
         Child in state stopping

Which really seems to be a response from (3); it fits nicely in the 
formatted output and seems to be a valid response.

When we retry the script we get the following;
         Command failed with error code 300

Even before the script tells me it issued (1).
The scripted output from (1) then tells me
         Child in state stopped

The other 2 commands don't give any response at all.
When trying the script for the third time we get the following just 
before the scripted output from (1)
         Rejected 400
         CLI communication error (hdr)

Then there is also the following STDERR after running (2);
         Command failed with error code 300

After this we try the script one more time and everything seems to work 
all right.

- The script only runs into problems when we haven't used it for a 
couple of weeks. When we use it more often it works fine.
- We use varnish 2.1.2, the debian package from testing.

So, I think there is a bug somewhere in the communication between 
varnishadm and varnishd.

More information about the varnish-misc mailing list