无法连接到Kafka经纪人

时间:2019-08-06 09:25:18

标签: java spring-boot apache-kafka

连接到Kafka Broker时,出现异常:

Caused by: org.apache.kafka.common.KafkaException: javax.security.auth.login.FailedLoginException: Null key
    at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:112)
    at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:114)
    at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:61)
    at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:86)
    at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:398)
    ... 103 common frames omitted

我添加了属性

kafka:
    properties:
      ssl:
        truststore:
         location:

当我尝试查看kafka属性时,我可以看到它具有提供的值。

我正在IBM Java版本“ 1.8.0_171”的Websphere Application Server上部署应用程序。

Kafka的其他属性:

kafka:
bootstrap-servers: {bootstrap servers}
registry-servers: {server}
properties:
  security.protocol: SASL_SSL
  sasl.mechanism: GSSAPI
  sasl.jaas.config: com.ibm.security.auth.module.Krb5LoginModule REQUIRED credsType='both' principal='guest@company.NET' useKeytab='/user/guest.keytab';
  sasl.kerberos.service.name: kafka
  ssl:
    truststore:
      location: file:path-to-truststore
      password:
    key:
      password:
producer:
  encryption:
    enabled: false

0 个答案:

没有答案