From 1e6a6a7bb40b1865ce18d6f345b4e69303f44624 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 4 Jul 2019 13:30:22 +0000 Subject: [PATCH] fix: handle errors reported by the conntrack package In particular, ENOBUFS which indicates data has been dropped. With this change the collector will restart, thus resynchronising with the OS. --- probe/endpoint/conntrack.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/probe/endpoint/conntrack.go b/probe/endpoint/conntrack.go index 155dfa41c..92678878e 100644 --- a/probe/endpoint/conntrack.go +++ b/probe/endpoint/conntrack.go @@ -147,6 +147,11 @@ func (c *conntrackWalker) run() { if !ok { return } + if f.Err != nil { + log.Errorf("conntrack event error: %v", f.Err) + stop() + return + } if c.relevant(f) { c.handleFlow(f) }