justinw
(Justin Walz)
October 24, 2018, 9:56pm
1
Hi,
Running filebeat 6.3.2 with "- add_docker_metadata" set, and periodically see this in the logs:
ERROR docker/watcher.go:233 Error getting container info: <nil>
Can you please provide some information as to what may be causing this?
Thanks, Justin
pierhugues
(Pier-Hugues Pellerin)
October 25, 2018, 1:27pm
2
From looking at the code and your error trace:
containers, err := w.listContainers(types.ContainerListOptions{
Filters: filter,
})
if err != nil || len(containers) != 1 {
logp.Err("Error getting container info: %v", err)
continue
}
It appears we make an API call and don't receive any containers information.
how often you see this in your log?
justinw
(Justin Walz)
October 25, 2018, 5:55pm
3
Not super often, but often enough that I felt it was worth asking about.
Looking at that loop, it seems like the only way to get there is after a 'start' or 'update' event. Is it potentially a timing issue / race condition if the watcher got an event for a start or update but cannot find the container by id?
Best, Justin
justinw
(Justin Walz)
October 25, 2018, 9:20pm
4
I also see this one, a little more frequently
2018-10-25T20:46:10.588Z ERROR kubernetes/watcher.go:254 kubernetes: Watching API error EOF
Looks like that comes from either of these two places:
return
default:
}
logp.Info("kubernetes: %s", "Watching API for resource events")
watcher, err := w.client.Watch(w.ctx, w.options.Namespace, w.k8sResourceFactory(), w.buildOpts()...)
if err != nil {
//watch failures should be logged and gracefully failed over as metadata retrieval
//should never stop.
logp.Err("kubernetes: Watching API error %v", err)
backoff(failures)
failures++
continue
}
for {
r := w.k8sResourceFactory()
eventType, err := watcher.Next(r)
if err != nil {
logp.Err("kubernetes: Watching API error %v", err)
logp.Err("kubernetes: Watching API error %v", err)
backoff(failures)
failures++
continue
}
for {
r := w.k8sResourceFactory()
eventType, err := watcher.Next(r)
if err != nil {
logp.Err("kubernetes: Watching API error %v", err)
watcher.Close()
if !(err == io.EOF || err == io.ErrUnexpectedEOF) {
// This is an error event which can be recovered by moving to the latest resource version
logp.Info("kubernetes: Ignoring event, moving to most recent resource version")
w.lastResourceVersion = ""
}
break
}
failures = 0
switch eventType {
Is this something to be concerned about?
system
(system)
Closed
November 22, 2018, 9:20pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.