At startup, if varnishncsa starts before varnishd it fails with the message:
Can't open VSM file (Abandoned VSM file (Varnish not running?) /usr/local/varnish/<hostname>/_.vsm
Also, if it starts just after varnishd did but before varnishd finished its initialization, it fails too, with the same message.
For the first problem, I think varnishncsa (and varnishlog) rc files need a require varnishd, for the second, I'm not sure how to fix it, wait a bit, check for the file ?
I created a review for a potential fix. Not sure I like it, but it does work.
A commit references this bug:
Date: Mon Jul 27 17:53:19 UTC 2015
New revision: 392997
Fix startup script order:
varnishncsa and varnishlog require varnishd to start successfully
mat reported some latency between starting varnishd and creation of
the _.vsm file used for communication, so a start_precmd has been added
to varnishncsa and varnishlog.
Differential Revision: https://reviews.freebsd.org/D3208