南~风

0 声望

这家伙太懒,什么都没留下

个人动态
  • 半兽人 回复 南~风kafka报 java.nio.file.NoSuchFileException: config/consumer.properties 中 :

    地址都不通,报超时了,感觉你kafka服务都没起来。

    1年前
  • 南~风 回复 半兽人kafka报 java.nio.file.NoSuchFileException: config/consumer.properties 中 :

    ./kafka-console-producer.sh --broker-list 192.168.4.24:9092 --topic laoguo1 --producer.config ../config/producer.properties

    报错1:

    [2023-01-09 17:02:26,053] ERROR Error when sending message to topic laoguo1 with key: null, value: 1 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
    org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for laoguo1-0: 1568 ms has passed since batch creation plus linger time

    ./kafka-console-consumer.sh --bootstrap-server 192.168.4.24:9092 --topic laoguo2 --consumer.config ../config/consumer.properties

    报错

    WARN The configuration 'zookeeper.connect' was supplied but isn't a known config. (org.apache.kafka.clients.consumer.ConsumerConfig)
    [2023-01-09 17:16:44,094] WARN The configuration 'zookeeper.connection.timeout.ms' was supplied but isn't a known config. (org.apache.kafka.clients.consumer.ConsumerConfig)

    大佬,这个是什么意思

    1年前
  • 半兽人 回复 南~风kafka实战SASL/SCRAM 中 :

    你验证过这些用户都正常吗,例如:

    ## 验证证书
    bin/kafka-configs.sh --zookeeper localhost:2181 --describe --entity-type users --entity-name alice
    
    bin/kafka-configs.sh --zookeeper localhost:2181 --describe --entity-type users --entity-name admin
    
    1年前
  • 半兽人 回复 南~风kafka报 java.nio.file.NoSuchFileException: config/consumer.properties 中 :

    你这个报错是没找到config/consumer.properties这个配置文件。

    用绝对路径或者:

    /bin/kafka-console-consumer.sh ...省略
    

    改成

    bin/kafka-console-consumer.sh ...省略
    
    1年前
  • 关注了用户 半兽人 · 1年前
  • 南~风 回复 半兽人kafka实战SASL/SCRAM 中 :

    大佬,kafka_2.11-2.1.1版本

    jaas.conf

    KafkaServer {
     org.apache.kafka.common.security.plain.PlainLoginModule required
     username="admin"
     password="admin@123"
     user_admin="admin@123"
     user_producer="producer@123"
     user_consumer="consumer@123";
    };
    KafkaClient{
     org.apache.kafka.common.security.plain.PlainLoginModule required
     username="kafka"
     password="kafka@123";
    };
    ZookeeperClient{
     org.apache.kafka.common.security.plain.PlainLoginModule required
     username="kafka"
     password="kafka@123";
    };
    if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
        export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G -Djava.security.auth.login.config=/root/upgrep/kafka_2.11-2.1.1/config/jaas.conf"
    fi
    

    报错:

    WARN SASL configuration failed: javax.security.auth.login.LoginException: No JAAS configuration section named 'Client' was found in specified JAAS configuration file: '/root/upgrep/kafka_2.11-2.1.1/config/jaas.conf'. Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it. (org.apache.zookeeper.ClientCnxn)
    ERROR [ZooKeeperClient] Auth failed. (kafka.zookeeper.ZooKeeperClient)

    求大佬指点迷津啊,谢谢大佬

    1年前