Authentication Kafka控制台生成器的相关Id错误

Authentication Kafka控制台生成器的相关Id错误,authentication,apache-kafka,authorization,kafka-producer-api,Authentication,Apache Kafka,Authorization,Kafka Producer Api,我已经启动了一个独立的kafka服务器(版本2.11-0.11.0.1),其中包含1个节点和1个zookeeper,我正在尝试使用ACL实现ssl,但无法生成。 执行以下步骤: 使用以下配置(即服务器属性)启动kafka节点: broker.id=0 侦听器=纯文本://127.0.0.1:9092,SSL://127.0.0.1:9093 adverted.listeners=SSL://127.0.0.1:9093 num.network.threads=3 num.io.threads=8

我已经启动了一个独立的kafka服务器(版本2.11-0.11.0.1),其中包含1个节点和1个zookeeper,我正在尝试使用ACL实现ssl,但无法生成。 执行以下步骤:

  • 使用以下配置(即服务器属性)启动kafka节点:

    broker.id=0
    侦听器=纯文本://127.0.0.1:9092,SSL://127.0.0.1:9093
    adverted.listeners=SSL://127.0.0.1:9093
    num.network.threads=3
    num.io.threads=8
    socket.send.buffer.bytes=102400 socket.receive.buffer.bytes=102400
    socket.request.max.bytes=104857600
    log.dirs=/tmp/kafka日志
    num.partitions=1
    num.recovery.threads.per.data.dir=1
    offset.topic.replication.factor=1
    transaction.state.log.replication.factor=1
    transaction.state.log.min.isr=1
    log.segment.bytes=1073741824
    zookeeper.connect=localhost:2181
    zookeeper.connection.timeout.ms=6000
    group.initial.rebalance.delay.ms=0
    ssl.keystore.location=/u/jewel/ssl+acl/kafka_2.11-0.11.0.1/kaf- 新建/server.keystore.jks
    ssl.keystore.password=test1234
    ssl.key.password=test1234
    ssl.truststore.location=/u/jewel/ssl+acl/kafka_2.11-0.11.0.1/kaf- 新建/server.truststore.jks
    ssl.truststore.password=test1234
    authorizer.class.name=kafka.security.auth.SimpleClauthorizer
    allow.everyone.if.no.acl.found=false
    super.users=User:CN=jewel,OU=atos,O=atos,L=mum,ST=maha,C=in
    ssl.client.auth=必需 ssl.enabled.protocols=TLSv1.2、TLSv1.1、TLSv1
    ssl.keystore.type=JKS
    ssl.truststore.type=JKS
    inter.broker.listener.name=SSL

  • 修改producer.properties如下:

    bootstrap.servers=localhost:9093
    压缩类型=无
    ssl.keystore.location=/u/jewel/ssl+acl/kafka_2.11-0.11.0.1/prod/server.keystore.jks
    ssl.keystore.password=test123
    ssl.key.password=test123
    security.protocol=SSL
    ssl.truststore.location=/u/jewel/ssl+acl/kafka_2.11-0.11.0.1/kaf new/client.truststore.jks
    ssl.truststore.password=test1234
    ssl.enabled.protocols=TLSv1.2、TLSv1.1、TLSv1
    ssl.keystore.type=JKS
    ssl.truststore.type=JKS

  • 使用以下命令在zookeeper创建ACL

    bin/kafka-acls.sh --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:CN=jewel,OU=atos,O=atos,L=mum,ST=maha,C=in --producer --topic
    
    安全嘿

  • 尝试使用以下命令生成主题:

    bin/kafka-console-producer.sh--代理列表localhost:9093--主题安全--producer.config/producer.properties

  • 失败,出现以下错误:

  • 警告与节点1的连接在身份验证期间终止。这可能表示由于凭据无效,身份验证失败。(org.apache.kafka.clients.NetworkClient)

    能否请您建议我能做些什么来进一步进行,我们将感谢您的帮助