confluent-kafka-python icon indicating copy to clipboard operation
confluent-kafka-python copied to clipboard

Producer receive REAUTH op even if no producer client is created

Open collinpowerkariman opened this issue 1 year ago • 0 comments

Description

When oauth token expire, the reauth op is receive by both consumer and producer even when no producer client has ever being created, resulting in continuous error log.

This did not cause an exception and the consumer still consuming the message, but the error message is very noisy.

How to reproduce

  1. Create a consumer client and admin client.
  2. Wait until token expire to trigger a reauth.

Checklist

Please provide the following information:

  • [x] confluent-kafka-python and librdkafka version (2.4.0 and 2.4.0):
  • [x] Consumer Client configuration: { "bootstrap.servers": brokers, "group.id": consumer_group, "enable.auto.commit": "false", "auto.offset.reset": "earliest", "security.protocol": "SASL_SSL", "sasl.mechanisms": "OAUTHBEARER", "oauth_cb": oauth_cb, "debug": "all" }
  • [x] Admin Clien configuration: { "bootstrap.servers": brokers, "allow.auto.create.topics": "false", "security.protocol": "SASL_SSL", "sasl.mechanisms": "OAUTHBEARER", "oauth_cb": oauth_cb, "debug": "all" }
  • [x] Provide client logs (with 'debug': 'all' as necessary)
%7|1729260332.086|REAUTH|rdkafka#producer-2| [THREAD_2]: BROKER_2: Received REAUTH op
%7|1729260332.086|STATE|rdkafka#producer-2| [THREAD_2]: BROKER_2: Broker changed state UP -> REAUTH
%7|1729260332.086|BROADCAST|rdkafka#producer-2| [THREAD_2]: Broadcasting state change
%7|1729260332.086|AUTH|rdkafka#producer-2| [THREAD_2]: BROKER_2: Auth in state REAUTH (handshake supported)
%7|1729260332.086|STATE|rdkafka#producer-2| [THREAD_2]: BROKER_2: Broker changed state REAUTH -> AUTH_HANDSHAKE
%7|1729260332.086|BROADCAST|rdkafka#producer-2| [THREAD_2]: Broadcasting state change
%7|1729260332.086|SEND|rdkafka#producer-2| [THREAD_2]: BROKER_2: Sent SaslHandshakeRequest (v1, 34 bytes @ 0, CorrId 6)
%7|1729260332.086|FAIL|rdkafka#producer-2| [THREAD_2]: BROKER_2: Disconnected (after 0ms in state AUTH_HANDSHAKE) (_TRANSPORT)
%6|1729260332.086|FAIL|rdkafka#producer-2| [THREAD_2]: BROKER_2: Disconnected (after 0ms in state AUTH_HANDSHAKE)
%7|1729260332.086|STATE|rdkafka#producer-2| [THREAD_2]: BROKER_2: Broker changed state AUTH_HANDSHAKE -> DOWN
...
%7|1729260332.377|FAIL|rdkafka#producer-2| [THREAD_2]: BROKER_2: SASL authentication error: [AWS_REQUEST_ID]: Access denied (after 271ms in state AUTH_REQ) (_AUTHENTICATION)
%3|1729260332.377|FAIL|rdkafka#producer-2| [THREAD_2]: BROKER_2: SASL authentication error: [AWS_REQUEST_ID]: Access denied (after 271ms in state AUTH_REQ)

collinpowerkariman avatar Oct 18 '24 17:10 collinpowerkariman