Kubernetes-client: use io.fabric8.kubernetes.client.Watcher<Event> to collect infomation

Created on 17 Jan 2019  路  8Comments  路  Source: fabric8io/kubernetes-client

when using io.fabric8.kubernetes.client.Watcher to collect infomation, throws the following error

`2019-01-17 19:58:08.784 INFO 9 --- [tes.default/...] cc.watch.event.EventWatcher : Watcher onClose
2019-01-17 19:58:08.785 ERROR 9 --- [tes.default/...] cc.watch.event.EventWatcher : The resourceVersion for the provided watch is too old.

io.fabric8.kubernetes.client.KubernetesClientException: The resourceVersion for the provided watch is too old.
at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$2.onMessage(WatchConnectionManager.java:258) [kubernetes-client-3.1.10.jar!/:na]
at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:288) [okhttp-3.5.0.jar!/:na]
at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:222) [okhttp-3.5.0.jar!/:na]
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:101) [okhttp-3.5.0.jar!/:na]
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:261) [okhttp-3.5.0.jar!/:na]
at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:200) [okhttp-3.5.0.jar!/:na]
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135) [okhttp-3.5.0.jar!/:na]
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) [okhttp-3.5.0.jar!/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]

2019-01-17 19:59:23.332 WARN 9 --- [tes.default/...] i.f.k.c.d.i.WatchConnectionManager : Exec Failure
`

bug statunever-stale

All 8 comments

@wangbin3685 : Could you please provide a test which reproduces this error?

I get this error sometimes when trying to watch a custom resource in Openshift 3.11.

ah, this needs some priority.

Do you know some workaround for this I could try?
Currently having this problem with Openshift 3.11, client version 4.2.2 (but also for 4.4.2) for reading custom resources. However it just happens when watching the whole cluster, not a particular namespace)

@csviri : Thanks for the info. Let me look into this in coming days.

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

@rohanKanojia is there a workaround for this?

@avmohan: Actually we have faced this in #1529 , but we reverted that (see this comment: https://github.com/fabric8io/kubernetes-client/pull/1800#issuecomment-549561724). I think it should be the responsibility of the caller to reconnect with the new resource version.

Was this page helpful?
0 / 5 - 0 ratings