Error at boot with varnishncsa
Lasse Karstensen
lkarsten at varnish-software.com
Thu Aug 28 14:07:25 CEST 2014
On Tue, Aug 26, 2014 at 05:36:37PM +0200, Jean Milot wrote:
> I have a problem with varnishncsa.
> I modified the /etc/default/varnishncsa file to launch varnishncsa at the
> boot but it seems that varnishncsa is launched before varnish.
> I have this error :
> Can't open VSM file (Abandoned VSM file (Varnish not running?)
> /var/lib/varnish/myhost/_.vsm)
> For information : i use Debian 7 and
> varnishd -V
> varnishd (varnish-4.0.1 revision 4354e5e)
> Copyright (c) 2006 Verdens Gang AS
> Copyright (c) 2006-2011 Varnish Software AS
> If i add sleep 10 in the /etc/init.d/varnishncsa, it works.
> How i can make it work without change the init.d file ?
Hi.
I don't think you can, this looks like a bug in the init script.
diff --git a/varnish.varnishncsa.init b/varnish.varnishncsa.init
index 8504fce..1d098ad 100644
--- a/varnish.varnishncsa.init
+++ b/varnish.varnishncsa.init
@@ -2,8 +2,8 @@
### BEGIN INIT INFO
# Provides: varnishncsa
-# Required-Start: $local_fs $remote_fs $network
-# Required-Stop: $local_fs $remote_fs $network
+# Required-Start: $local_fs $remote_fs $network varnish
+# Required-Stop: $local_fs $remote_fs $network varnish
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start HTTP accelerator log daemon
Does it work without sleep 10 if you apply this tiny change?
(you may have to do update-rc.d to get the ordering recomputed)
--
Lasse Karstensen
Varnish Software AS
More information about the varnish-misc
mailing list