访问不到本机虚拟机上面的kafka服务

参考:https://blog.csdn.net/zyt_1272999061/article/details/79484702

# The address the socket server listens on. It will get the value returned from
# java.net.InetAddress.getCanonicalHostName() if not configured.

显式设置kafka的具体地址和端口,如果没设置,默认使用java.net.InetAddress.getCanonicalHostName()获取的主机域名

# The address the socket server listens on. It will get the value returned from 
# java.net.InetAddress.getCanonicalHostName() if not configured.
#   FORMAT:
#     listeners = listener_name://host_name:port
#   EXAMPLE:
#     listeners = PLAINTEXT://your.host.name:9092
listeners=PLAINTEXT://10.0.5.203:9092

这里强行设置成具体ip,端口

listeners=PLAINTEXT://10.0.5.203:9092

你可能感兴趣的:(kafka)