WARN - The configuration 'zookeeper.connect' was supplied but isn't a known config.
WARN - The configuration 'input.topic' was supplied but isn't a known config.
WARN - Bootstrap broker ip:9092 disconnected       
WARN - Bootstrap broker ip:9092 disconnected
WARN - Bootstrap broker ip:9092 disconnected

1.首先检查 zookeeper集群和kafka集群是否正常

发现没有问题

2.检查scala代码kafka配置文件是否写错

没有写错

3.检查kafka版本

原来是pom.xml中kafka版本错误,保持与安装版本一致

<dependency>
   <groupId>org.apache.kafka</groupId>
   <artifactId>kafka_2.11</artifactId>
   <version>0.10.1.0</version>
</dependency>

替换

<dependency>
    <groupId>org.apache.kafka</groupId>
   <artifactId>kafka_2.11</artifactId>
    <version>0.10.0.0</version>
</dependency>

05-17 17:11