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

Can't reconcile any Nifikop CR due to "unable to get: / because of unknown namespace for the cache" error #496

Open
sisrael-dn opened this issue Dec 10, 2024 · 0 comments
Labels
bug Something isn't working community

Comments

@sisrael-dn
Copy link

sisrael-dn commented Dec 10, 2024

What steps will reproduce the bug?

  1. Create a 3 node K3s cluster (using K3d)
  2. Create nifi namespace
  3. helm install nifikop helm/nifikop --version 1.11.4 -n nifi -f custom-nifikop.yaml
  4. helm install nifi-cluster helm/nifi-cluster --version 1.11.4 -n nifi -f custom-nifi-cluster.yaml
  5. Install separate nifi-registry helm chart from https://github.com/dysnix/charts/tree/main/dysnix/nifi-registry

value files:
custom-nifikop.yaml.txt
custom-nifi-cluster.yaml.txt

What is the expected behavior?

All CR reconciled , no errors in nifikop pod logs

What do you see instead?

  • nifikop chart seems to be installed and starts OK
  • nifi-cluster chart seems to be installed and starts OK
  • NifiCluster and NifiRegisttryClient CR were created
  • zookeeper and nifi-cluster pods are up & running
  • nifi seems to work - I can access to its UI and work with it
  • nifi-registry seems to work - I can access to its UI and work create some test bucket
  • If I create manually a registry client in nifi - I can use it and save a test flow version on it

However these issues occur:

  1. on kubectl I see that cluster has not reconciled yet long after it's up:
$ kubectl nifikop nificluster get -n nifi
  NAMESPACE  NAME               STATE
  nifi       nifi-cluster-test  ClusterRollingUpgrading
  1. The nifi-cluster-test-default-registry-client CR has this error:
Failed to create HTTP client for the referenced cluster: nifi-cluster-test in nifi

And doesn't look like it has been added to nifi

  1. The nifikop pod logs show these errors in repeat , which indicate non of the resources can be reconciled:
"level":"error","time":"2024-12-10T08:16:06.298Z","caller":"controller/controller.go:329","msg":"Reconciler error","controller":"nificluster","controllerGroup":"nifi.konpyutaika.com","controllerKind":"NifiCluster","nifiCluster":{"name":"nifi-cluster-test","namespace":"nifi"},"namespace":"nifi","name":"nifi-cluster-test","reconcileID":"dc91d213-681a-48bb-8462-cba39622658e","error":"Failed to create HTTP client the for referenced cluster: unable to get: / because of unknown namespace for the cache","errorVerbose":"unable to get: / because of unknown namespace for the cache\nFailed to create HTTP client the for referenced cluster\ngithub.com/konpyutaika/nifikop/pkg/resources/nifi.(*Reconciler).Reconcile\n\t/workspace/pkg/resources/nifi/nifi.go:248\ngithub.com/konpyutaika/nifikop/internal/controller.(*NifiClusterReconciler).Reconcile\n\t/workspace/internal/controller/nificluster_controller.go:148\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}
{"level":"info","time":"2024-12-10T08:19:29.362Z","logger":"controller.NifiRegistryClient","caller":"controller/controller_common.go:35","msg":"failed to create HTTP client the for referenced cluster nifi-cluster-test for registry client nifi-cluster-test-default-registry-client"}
{"level":"error","time":"2024-12-10T08:19:29.362Z","caller":"controller/controller.go:329","msg":"Reconciler error","controller":"nifiregistryclient","controllerGroup":"nifi.konpyutaika.com","controllerKind":"NifiRegistryClient","nifiRegistryClient":{"name":"nifi-cluster-test-default-registry-client","namespace":"nifi"},"namespace":"nifi","name":"nifi-cluster-test-default-registry-client","reconcileID":"65216b30-318f-47ca-977a-f015555edb67","error":"unable to get: / because of unknown namespace for the cache","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}
{"level":"info","time":"2024-12-10T08:23:26.225Z","logger":"controller.NifiClusterTask","caller":"controller/controller_common.go:35","msg":"unable to get: / because of unknown namespace for the cache"}
{"level":"error","time":"2024-12-10T08:23:26.225Z","caller":"controller/controller.go:329","msg":"Reconciler error","controller":"nificluster","controllerGroup":"nifi.konpyutaika.com","controllerKind":"NifiCluster","nifiCluster":{"name":"nifi-cluster-test","namespace":"nifi"},"namespace":"nifi","name":"nifi-cluster-test","reconcileID":"3ed4b283-236a-4084-8023-98e212950c43","error":"unable to get: / because of unknown namespace for the cache","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}

Possible solution

No response

NiFiKop version

v1.11.4-release

Golang version

go version go1.23.4 linux/amd64

Kubernetes version

Client Version: v1.31.3
Kustomize Version: v5.4.2
Server Version: v1.31.2+k3s1

NiFi version

1.28.0

Additional context

No response

@sisrael-dn sisrael-dn added bug Something isn't working community labels Dec 10, 2024
@sisrael-dn sisrael-dn changed the title Can't reconcile any Nifikop CR because of "unable to get: / because of unknown namespace for the cache" Can't reconcile any Nifikop CR due to "unable to get: / because of unknown namespace for the cache" error Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community
Projects
None yet
Development

No branches or pull requests

1 participant