INFO [,,] --- [ad | producer-1] : [] o.apache.kafka.common.network.Selector : [Producer clientId=producer-1] Failed authentication with localhost/127.0.0.1 (Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are [])
2023-05-19 17:46:03.427 ERROR [,,] --- [ad | producer-1] : [] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node -1 (localhost/127.0.0.1:9092) failed authentication due to: Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are []
2023-05-19 17:46:03.428 WARN [,,] --- [ad | producer-1] : [] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected
мои настройки
security:
protocol: SASL_PLAINTEXT
properties:
sasl.mechanism: PLAIN
sasl.jaas.config: >-
org.apache.kafka.common.security.plain.PlainLoginModule required username="(username)" password="(password)";
producer:
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
почему механизм PLAIN не включен?
видимо в настройках кластера не хватает sasl.enabled.mechanisms=PLAIN
Обсуждают сегодня