Hello dear mainteners!

I'm resending this mail to ports@ since I don't know if the two
Varnish mainteners' addresses are still topical.

I've ran into an annoying issue when using Varnish behind
HAproxy. I first thought it was a bug related to my configuration
but it's not. When bypassing HAproxy Varnish works like a charm.
Actually the bug comes from the tcp check made by HAproxy.

Below are all the relevant informations :

# sysctl -n kern.version
OpenBSD 6.1 (GENERIC) #19: Sat Apr  1 13:42:46 MDT 2017
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC

# rcctl get varnishd
varnishd_class=daemon
varnishd_flags=-a :8081 -t 86400 -T localhost:6082 -f /etc/varnish/default.vcl 
-s malloc,256m
varnishd_rtable=0
varnishd_timeout=30
varnishd_user=root

# tail -2 /etc/haproxy/haproxy.cfg
backend web
        server localhost 127.0.0.1:8081 check observe layer4

# tail -f /var/log/messages
Apr 24 17:43:49 bunny varnishd[36047]: Child (79294) not responding to CLI, 
killed it.
Apr 24 17:43:49 bunny varnishd[36047]: Unexpected reply from ping: 400 CLI 
communication error (hdr)
Apr 24 17:43:49 bunny varnishd[36047]: Child (79294) died signal=11 (core 
dumped)
Apr 24 17:43:49 bunny varnishd[36047]: Child (79294) Panic at: Mon, 24 Apr 2017 
15:43:49 GMT Assert error in vca_make_session(), cache/cache_acceptor.c line 
351:   Condition((getsockname(sp->fd, (void*)&ss, &sl)) == 0) not true. version 
= varnish-5.1.1 revision de38712, vrt api = 6.0 ident = OpenBSD,6.1,amd64,-jnon
e,-smalloc,-smalloc,-hcritbit,kqueue now = 599218.343018 (mono), 
1493048627.415632 (real)
Apr 24 17:43:51 bunny haproxy: vfprintf %s NULL in "<<<<>%s %2d %02d:%02d:%02d 
%.*s%*s"
Apr 24 17:43:57 bunny varnishd[36047]: Child (74901) not responding to CLI, 
killed it.
Apr 24 17:43:57 bunny varnishd[36047]: Unexpected reply from ping: 400 CLI 
communication error (hdr)
Apr 24 17:43:57 bunny haproxy: vfprintf %s NULL in "<<<<>%s %2d %02d:%02d:%02d 
%.*s%*s"
Apr 24 17:43:57 bunny varnishd[36047]: Child (74901) died signal=11 (core 
dumped)
Apr 24 17:43:57 bunny varnishd[36047]: Child (74901) Panic at: Mon, 24 Apr 2017 
15:43:57 GMT Assert error in vca_make_session(), cache/cache_acceptor.c line 
351:   Condition((getsockname(sp->fd, (void*)&ss, &sl)) == 0) not true. version 
= varnish-5.1.1 revision de38712, vrt api = 6.0 ident = OpenBSD,6.1,amd64,-jnon
e,-smalloc,-smalloc,-hcritbit,kqueue now = 599226.406665 (mono), 
1493048635.479278 (real)
Apr 24 17:44:03 bunny varnishd[36047]: Child (99748) not responding to CLI, 
killed it.
Apr 24 17:44:03 bunny varnishd[36047]: Unexpected reply from ping: 400 CLI 
communication error (hdr)
Apr 24 17:44:03 bunny haproxy: vfprintf %s NULL in "<<<<>%s %2d %02d:%02d:%02d 
%.*s%*s"
Apr 24 17:44:03 bunny varnishd[36047]: Child (99748) died signal=11 (core 
dumped)
Apr 24 17:44:03 bunny varnishd[36047]: Child (99748) Panic at: Mon, 24 Apr 2017 
15:44:03 GMT Assert error in vca_make_session(), cache/cache_acceptor.c line 
351:   Condition((getsockname(sp->fd, (void*)&ss, &sl)) == 0) not true. version 
= varnish-5.1.1 revision de38712, vrt api = 6.0 ident = OpenBSD,6.1,amd64,-jnon
e,-smalloc,-smalloc,-hcritbit,kqueue now = 599232.746357 (mono), 
1493048641.818970 (real)
Apr 24 17:44:09 bunny varnishd[36047]: Child (59615) not responding to CLI, 
killed it.

When I disable the TCP check in HAproxy, everything's fine.

# sed -i 's#server localhost 127.0.0.1:8081 check observe layer4#server 
localhost 127.0.0.1:8081#' /etc/haproxy/haproxy.cfg

Sorry for the width of this mail.

Kind regards,
-- 
Tristan

Reply via email to