I am getting the InconsistentGroupProtocolException infrequently when running Debezium SQL DB connector on an Azure AKS pod.
*org.apache.kafka.common.errors.InconsistentGroupProtocolException: The group member's supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list.*
The Debezium connector (for SQl DB) runs fine for a while, sometimes a day or more and then fails with this error.
There is a similar question posted here, and trying to understand the resolution mentioned better.
I am using a group ID in the docker file that installs Debezium. And there is a consumer group ID (schema.history.internal.consumer.group.id) in the SQL DB connector registration. The same group ID is being used in both places. So the group ID in the docker file is the one used by Kafka connect group that publishes messages from Debezium?
Has anyone faced a similar issue? And what can be done to resolve?
To address the
InconsistentGroupProtocolException, the following points should be consideredEnsure that the group ID specified in the Debezium connector configuration is unique and not shared with other applications or connectors that might cause conflicts. Use the same version of the Debezium connector across your deployment to prevent inconsistencies.
Debezium can be deployed on AKS as below.
First create a namespace
for the Debezium deployment here I will use Strimzi, which manages the Kafka deployment on Kubernetes. Please see the Strimzi deployment documentation for more details on how to deploy Strimzi on your Kubernetes cluster. you can install it by running the following command:
Now, install Strimzi operator itself
when deploying Debezium Kafka connector, we will need to provide the username and password for the connector to be able to connect to the database. Kubernetes provides the
Secretobject for this purpose. Besides creating theSecretobject itself, we have to also create a role and a role binding so that Kafka can access the credentials.Now, we can create a role, which refers the secret created in the previous step
We also have to bind this role to the Kafka Connect cluster service account so that Kafka Connect can access the secret
Next, deploy your Kafka cluster
and wait until it's ready
Here I will be using MySQL and create the service and deployment accordingly.
To deploy a Debezium connector, you need to deploy a Kafka Connect cluster with the required connector plugins, before instantiating the actual connector itself. As the first step, a container image for Kafka Connect with the plugin has to be created. If you already have a container image built and available in the registry, you can skip this step.
here, I will use Strimzi for creating the Kafka Connect cluster.
Note, you need to replace the name of the registry with your registry where you have pushed the image.
If you already have a suitable container image either in the local or a remote registry (such as acr), you can use this simplified version.
To create a Debezium connector, you just need to create a
KafkaConnectorwith the appropriate configuration, MySQL in this case.Reference- Debezium on k8s