你kafka都没启动成功,没找到你的配置文件。
listeners= PLAINTEXT://[我的服务器对内ip]:9092
我已经修改了这个配置,但还是报这个错
Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
然后进到server.log发现有如下报错:
ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.nio.file.NoSuchFileException: config/server.propertie
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)
at org.apache.kafka.common.utils.Utils.loadProps(Utils.java:666)
at org.apache.kafka.common.utils.Utils.loadProps(Utils.java:653)
at kafka.Kafka$.getPropsFromArgs(Kafka.scala:52)
at kafka.Kafka$.main(Kafka.scala:86)
at kafka.Kafka.main(Kafka.scala)
listeners= PLAINTEXT://[我的服务器对内ip]:9092
我已经修改了这个配置,但还是报这个错
Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)