Aiokafka connecting fails silently

445 Views Asked by At

I'm trying to connect a aiokafka consumer with the following config.

    kafka_config = {
        "bootstrap_servers": "b-2.cpkafkacluster-2106.vi24p2.c1.kafka.eu-central-1.amazonaws.com:9096",
        "security_protocol": "SASL_SSL",
        "sasl_mechanism": "SCRAM-SHA-512",
        "sasl_plain_username": "valid_username",
        "sasl_plain_password": "valid_password",
        "ssl_context": create_ssl_context(),
        "retry_backoff_ms": 500,
        "request_timeout_ms": 20000,
        "group_id": "some_group_id",
    }

When running this and locking at the logs, only the following loogs aiokafka arrive, nothing more. It seems like neither an error occured, but nor is the connection established (I also do not see the consumer group in kafdrop and also receive no messages on the consumer)

<AIOKafkaConnection host=b-2.cpkafkacluster-2106.vi24p2.c1.kafka.eu-central-1.amazonaws.com port=9096> Response 1: SaslHandShakeResponse_v0(error_code=0, enabled_mechanisms=['SCRAM-SHA-512'])
<AIOKafkaConnection host=b-2.cpkafkacluster-2106.vi24p2.c1.kafka.eu-central-1.amazonaws.com port=9096> Request 1: SaslHandShakeRequest_v0(mechanism='SCRAM-SHA-512')

I'm kind of at a loss here what is going wrong.

Additional Info:

  • An other consumer using kafka-python with the same config works
  • Local execution with a kafka docker image without SASL does work as well
0

There are 0 best solutions below