operator-framework / java-operator-sdk

Java SDK for building Kubernetes Operators
https://javaoperatorsdk.io/
Apache License 2.0
801 stars 215 forks source link

Force closing the watch io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager #2275

Closed GopiChandra25 closed 8 months ago

GopiChandra25 commented 8 months ago

Hi Team, Currently am working on creating Operator using Quarkus SDK framwork. quarkus-sdk.version : 6.1.1

Operator has reconciliation loop run every 500 seconds and also we wrote logic to override based on user requirement using CR object configuration and also it has one cronjob as dependent resource.

Operator is working fine util it getting connection issue with Kubernetes API server for some time. During Connection issue between Operator to K8s api server getting below Connection reset error. ERROR [io.ver.cor.net.imp.ConnectionBase] (vert.x-eventloop-thread-7) Connection reset: java.net.SocketException: Connection reset at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426)

and we found [io.fab.kub.cli.dsl.int.AbstractWatchManager] (vert.x-eventloop-thread-7) Force closing the watch io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager@c00f5e3 DEBUG [io.fab.kub.cli.dsl.int.WatcherWebSocketListener] (vert.x-eventloop-thread-7) WebSocket error received: io.vertx.core.http.HttpClosedException: Connection was closed

Later this if connection is restored and operator reconcilation loop successfully executing with older version of the CR object, it not identifying and reacting any changes on CR object as well dependent resource object

GopiChandra25 commented 8 months ago

Updated Quarkus SDK framework version 6.1.1 to 6.6.4 in my pom.xml, issue got resolved. Closing this item now. Thank you.