[root@linux04 Downloads]# java -cp kafka001-1.0-SNAPSHOT.jar com.bw.Stream.Application
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.apache.kafka.common.KafkaException: Failed create new KafkaAdminClient
    at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:370)
    at org.apache.kafka.clients.admin.AdminClient.create(AdminClient.java:62)
    at org.apache.kafka.streams.processor.internals.DefaultKafkaClientSupplier.getAdminClient(DefaultKafkaClientSupplier.java:34)
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:707)
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:628)
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:612)
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:602)
    at com.bw.Stream.Application.main(Application.java:38)
Caused by: org.apache.kafka.common.config.ConfigException: No resolvable bootstrap urls given in bootstrap.servers
    at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:66)
    at org.apache.kafka.clients.admin.KafkaAdminClient.<init>(KafkaAdminClient.java:409)
    at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:363)

 

 
 

 

kafka中的错误

 

因为我的打的jar包中找不到 主机名称  记得改成自己的

转载于:https://www.cnblogs.com/JBLi/p/11360075.html

Logo

Kafka开源项目指南提供详尽教程,助开发者掌握其架构、配置和使用,实现高效数据流管理和实时处理。它高性能、可扩展,适合日志收集和实时数据处理,通过持久化保障数据安全,是企业大数据生态系统的核心。

更多推荐