[CDC:ErrKafkaNewSaramaProducer]new sarama producer: [CDC:ErrKafkaInvalidConfig]because TiCDC Kafka producer's `request.required.acks` defaults to -1, TiCDC cannot deliver messages when the `replication-factor` is less than `min.insync.replicas`: kafka server: The client is not authorized to send this request type.
I have checked this bug, but it was already fixed in 5.4.0:
Could you please tell me which parameter I have not set correctly?
The bug occurred when creating a task with CDC after pre-creating a topic in Kafka. I tested it on the Kafka used for testing, and it can synchronize normally after removing the “asal”.
Uh, could it be that Kafka itself hasn’t enabled SASL authentication? Otherwise, it would be very strange. If authentication is enabled, how can it still synchronize normally after removing the authentication parameters?
Oh, what I mean is
In the production environment, both Kafka and TiCDC have authentication enabled, which triggered a bug.
In the test environment, Kafka and TiCDC do not have authentication enabled, and CDC tasks can be created normally.
Hello, what is the value of min.insync.replicas? Please confirm if sasl-user and sasl-password are correct. You can try changing sasl-mechanism=SCRAM-SHA-256 to lowercase.
I encountered the error “Kafka server: the client is not authorized to send this request type,” which seems similar to your issue. I spent a long time troubleshooting and eventually discovered it was a Kafka user permissions problem. TiCDC requires certain permissions to connect to Kafka via ACL:
The minimum set of permissions required for TiCDC to function properly are:
(1) Create and Write permissions for the Topic resource type.
(2) DescribeConfigs permission for the Cluster resource type.
The reason for my issue was that the Kafka user lacked Write permission for the Topic resource type and DescribeConfigs permission for the Cluster resource type.