ktail continually prints connection warnings/errors after losing network connection
schellj opened this issue · 2 comments
schellj commented
I usually have a terminal window open running ktail on one or more deployments/statefulsets. If I close my laptop and come back later, the terminal window will be continually printing the warnings/errors below.
The logs will resume tailing as expected if I quit ktail and run the same command that was running.
==> Warning: Error while tailing container [xxx-1:yyy]: Get https://xxx.xxx.xxx.xxx/api/v1/namespaces/default/pods/xxx-1/log?container=yyy&follow=true&sinceTime=2020-04-14T18%3A52%3A51Z×tamps=true: http2: no cached connection was available
E0414 14:11:26.286144 59041 reflector.go:205] pkg/mod/k8s.io/client-go@v7.0.0+incompatible/tools/cache/reflector.go:99: Failed to list *v1.Pod: Get https://xxx.xxx.xxx.xxx/api/v1/namespaces/default/pods?limit=500&resourceVersion=0: http2: no cached connection was available
E0414 14:11:27.290462 59041 reflector.go:205] pkg/mod/k8s.io/client-go@v7.0.0+incompatible/tools/cache/reflector.go:99: Failed to list *v1.Pod: Get https://xxx.xxx.xxx.xxx/api/v1/namespaces/default/pods?limit=500&resourceVersion=0: http2: no cached connection was available
E0414 14:11:28.292712 59041 reflector.go:205] pkg/mod/k8s.io/client-go@v7.0.0+incompatible/tools/cache/reflector.go:99: Failed to list *v1.Pod: Get https://xxx.xxx.xxx.xxx/api/v1/namespaces/default/pods?limit=500&resourceVersion=0: http2: no cached connection was available
E0414 14:11:29.295761 59041 reflector.go:205] pkg/mod/k8s.io/client-go@v7.0.0+incompatible/tools/cache/reflector.go:99: Failed to list *v1.Pod: Get https://xxx.xxx.xxx.xxx/api/v1/namespaces/default/pods?limit=500&resourceVersion=0: http2: no cached connection was available
E0414 14:11:30.296057 59041 reflector.go:205] pkg/mod/k8s.io/client-go@v7.0.0+incompatible/tools/cache/reflector.go:99: Failed to list *v1.Pod: Get https://xxx.xxx.xxx.xxx/api/v1/namespaces/default/pods?limit=500&resourceVersion=0: http2: no cached connection was available
(Statefulset, container, and IP addresses redacted)
atombender commented
Unfortunately, I believe this happens internally in the Kubernetes client and isn't something that can be handled by ktail. Maybe you can try the latest release of ktail, which upgrades the client to a newer version?
schellj commented
@atombender thanks, updating ktail seems to have done the trick. Closing.