Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use io.fabric8.kubernetes.client.Watcher<Event> to collect infomation #1318

Closed
wangbin3685 opened this issue Jan 17, 2019 · 9 comments
Closed

Comments

@wangbin3685
Copy link

wangbin3685 commented Jan 17, 2019

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
@rohanKanojia
Copy link
Member

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

@psapozhnikov
Copy link

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

@rohanKanojia
Copy link
Member

ah, this needs some priority.

@csviri
Copy link
Contributor

csviri commented Aug 24, 2019

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)

@rohanKanojia
Copy link
Member

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

@stale
Copy link

stale bot commented Nov 28, 2019

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!

@avmohan
Copy link

avmohan commented Feb 5, 2020

@rohanKanojia is there a workaround for this?

@rohanKanojia
Copy link
Member

rohanKanojia commented Feb 5, 2020

@avmohan: Actually we have faced this in #1529 , but we reverted that (see this comment: #1800 (comment)). I think it should be the responsibility of the caller to reconnect with the new resource version.

@shawkins
Copy link
Contributor

Marking as resolved - to not introduce additional Watcher logic, the suggestion is to use an informer instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants