Open bkak opened 1 year ago
I'm having similar issue .. @bkak - did you find a fix for this ?
Note : I'm deploying on GKE (Kubernetes), though i think that should not make a difference
Additional Details :
Schema-Registry-operator is deployed in namespace - 'strimzi-registry-operator' Strimzi Kafka(cluster - versa-kafka-gke) - deployed in namespace - 'kafka'
Part of the Strimzi kafka yaml, with version & listeners :
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: versa-kafka-gke #1
spec:
kafka:
version: 3.0.0
replicas: 3
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
authentication:
type: tls
- name: external
port: 9094
type: loadbalancer
tls: true
authentication:
type: tls
authorization:
type: simple
KafkaUser (confluent-schema-registry) & KafkaTopic (registry-schemas), deployed in namespace - 'kafka' Confluent Schema Registry - deployed in namespace - 'kafka' (
Error (similar to the above):
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Error Logging 73s kopf Handler 'create_registry' failed with an exception. Will retry.
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once
result = await invoke_handler(
File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler
result = await invocation.invoke(
File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/invocation.py", line 139, in invoke
await asy...al/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/venv/lib/python3.10/site-packages/strimziregistryoperator/handlers/createregistry.py", line 131, in create_registry
bootstrap_server = get_kafka_bootstrap_server(
File "/opt/venv/lib/python3.10/site-packages/strimziregistryoperator/deployments.py", line 83, in get_kafka_bootstrap_server
raise kopf.Error(msg, delay=10)
AttributeError: module 'kopf' has no attribute 'Error'
Normal Logging 73s kopf Creating a new Schema Registry deployment: confluent-schema-registry with listener=tls (security protocol=tls) and strimzi-version=v1beta2 serviceType=ClusterIP image=confluentinc/cp-schema-registry:7.2.1
Normal Logging 12s kopf Creating a new Schema Registry deployment: confluent-schema-registry with listener=tls (security protocol=tls) and strimzi-version=v1beta2 serviceType=ClusterIP image=confluentinc/cp-schema-registry:7.2.1
Error Logging 12s kopf Handler 'create_registry' failed with an exception. Will retry.
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once
result = await invoke_handler(
File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler
result = await invocation.invoke(
File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/invocation.py", line 139, in invoke
await asy...al/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/venv/lib/python3.10/site-packages/strimziregistryoperator/handlers/createregistry.py", line 131, in create_registry
bootstrap_server = get_kafka_bootstrap_server(
File "/opt/venv/lib/python3.10/site-packages/strimziregistryoperator/deployments.py", line 83, in get_kafka_bootstrap_server
raise kopf.Error(msg, delay=10)
AttributeError: module 'kopf' has no attribute 'Error'
I am deploying this operator in AKS using tls.
However, upon starting "StrimziSchemaRegistry" I get this error in registry operator -
Traceback (most recent call last): File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once result = await invoke_handler( File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler result = await invocation.invoke( File "/opt/venv/lib/python3.10/site-packages/kopf/_core/actions/invocation.py", line 139, in invoke await asyncio.shield(future) # slightly expensive: creates tasks File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/opt/venv/lib/python3.10/site-packages/strimziregistryoperator/handlers/createregistry.py", line 131, in create_registry bootstrap_server = get_kafka_bootstrap_server( File "/opt/venv/lib/python3.10/site-packages/strimziregistryoperator/deployments.py", line 83, in get_kafka_bootstrap_server raise kopf.Error(msg, delay=10) AttributeError: module 'kopf' has no attribute 'Error' [2022-11-23 15:47:42,760] kopf.objects [DEBUG ] [tls-kafka/confluent-schema-registry] Patching with: {'metadata': {'annotations': {'kopf.zalando.org/create_registry': '{"started":"2022-11-23T08:18:50.979989","delayed":"2022-11-23T15:48:42.760410","purpose":"create","retries":438,"success":false,"failure":false,"message":"module \'kopf\' has no attribute \'Error\'"}', 'kopf.zalando.org/touch-dummy': None}}, 'status': {'kopf': {'progress': {'create_registry': {'started': '2022-11-23T08:18:50.979989', 'stopped': None, 'delayed': '2022-11-23T15:48:42.760410', 'purpose': 'create', 'retries': 438, 'success': False, 'failure': False, 'message': "module 'kopf' has no attribute 'Error'", 'subrefs': None}}}}} [2022-11-23 15:47:42,788] kopf.objects [WARNING ] [tls-kafka/confluent-schema-registry] Patching failed with inconsistencies: (('remove', ('status',), {'kopf': {'progress': {'create_registry': {'started': '2022-11-23T08:18:50.979989', 'stopped': None, 'delayed': '2022-11-23T15:48:42.760410', 'purpose': 'create', 'retries': 438, 'success': False, 'failure': False, 'message': "module 'kopf' has no attribute 'Error'", 'subrefs': None}}}}, None),) [2022-11-23 15:47:42,788] kopf.objects [DEBUG ] [tls-kafka/confluent-schema-registry] Sleeping was skipped because of the patch, 59.999766 seconds left.
Using this manifest for StrimziSchemaRegistry
apiVersion: roundtable.lsst.codes/v1beta1 kind: StrimziSchemaRegistry metadata: name: confluent-schema-registry spec: strimziVersion: v1beta2 listener: tls securityProtocol: tls compatibilityLevel: forward registryImage: confluentinc/cp-schema-registry registryImageTag: "7.2.2" cpuLimit: "" cpuRequest: "" memoryLimit: "" memoryRequest: ""
I am stuck now, with no idea where to debug. Any help is appreciated.
Hi @bkak - were you able to resolve this issue ? I'm facing similar issue
Hello I am facing the exact issue, please advise
Received same error. 🥲
Not related with this issue, but here is a solution using Confluent Schema Registry packaged by Bitnami in case it helps some people to unblock their work. It works well with Kafka created by Strimzi too. 😃
I am deploying this operator in AKS using tls.
However, upon starting "StrimziSchemaRegistry" I get this error in registry operator -
Using this manifest for StrimziSchemaRegistry
I am stuck now, with no idea where to debug. Any help is appreciated.