当前位置: 首页 > 知识库问答 >
问题:

Kafka动物园管理员非标准港口

谈阎宝
2023-03-14
[2019-11-07 11:33:55,240] INFO Accepted socket connection from /192.168.0.52:52030 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2019-11-07 11:33:55,246] INFO Client attempting to establish new session at /192.168.0.52:52030 (org.apache.zookeeper.server.ZooKeeperServer)
[2019-11-07 11:33:55,250] INFO Established session 0x3004c34f9640003 with negotiated timeout 30000 for client /192.168.0.52:52030 (org.apache.zookeeper.server.ZooKeeperServer)
[2019-11-07 11:33:55,765] INFO Closed socket connection for client /192.168.0.52:52030 which had sessionid 0x3004c34f9640003 (org.apache.zookeeper.server.NIOServerCnxn)
[2019-11-07 11:34:16,499] INFO Accepted socket connection from /192.168.0.52:52038 (org.apache.zookeeper.server.NIOServerCnxnFactory)
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=0
server.1=192.168.0.52:2888:3888
server.2=192.168.0.53:2888:3888
server.3=192.168.0.54:2888:3888
############################# Socket Server Settings #############################

# 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://192.168.0.52:9092

# Hostname and port the broker will advertise to producers and consumers. If not set,
# it uses the value for "listeners" if configured.  Otherwise, it will use the value
# returned from java.net.InetAddress.getCanonicalHostName().
advertised.listeners=PLAINTEXT://192.168.0.52:9092

共有1个答案

牟焱
2023-03-14

您在日志中看到的是连接到ZooKeeper的远程客户端的套接字(主机和端口)。

您将Zookeeper配置为侦听端口2888,但连接到Zookeeper的客户端可以使用其任何(客户端)端口。

例如,在:

Accepted socket connection from /192.168.0.52:52038
Client                      Zookeeper
192.168.0.52:52038   ---->  192.168.0.52:2888
 类似资料:
  • 分布式 Apache HBase 安装依赖于正在运行的 ZooKeeper 集群。所有参与节点和客户端都需要能够访问正在运行的 ZooKeeper 集合。 Apache HBase 默认为您管理 ZooKeeper“集群”。它将启动和停止 ZooKeeper 集合作为 HBase 启动/停止过程的一部分。您还可以独立于 HBase 管理 ZooKeeper 集合,只需将 HBase 指向它应该使用

  • 假设我有 3 台 Kafka 服务器。服务器 1 zoopkeeper1 服务器 2 zoopkeeper2 服务器 3 zoopkeeper3 在集群配置中,zoopkeepers 会发生什么?它们是为每个服务器单独维护的,还是会在群集配置中同步其数据?

  • 在Zookeeper和代理身份验证上启用SASL时,我面临以下错误。 以下配置在JAAS文件中给出,该文件作为KAFKA_OPTS传递,将其作为JVM参数:- Kafka经纪人的服务器。属性设置了以下额外字段:- Zookeeper属性如下所示:

  • 注意:这将只显示有关使用Java消费者API的消费者(非基于ZooKeeper的消费者)的信息。 此工具还适用于基于ZooKeeper的使用者: bin/kafka-consumer-groups.sh--zookeeper localhost:2181--description--group my-group null PS:这似乎没有出现在2.5文档中

  • 如果我部署war,我将得到以下异常: 原因:org.apache.camel.resolveEndpointFailedException:无法解析endpoint:kafka://localhost:9092?serializerClass=kafka.serializer.stringencoder&topic=checking&zookeePerhost=localhost&zookeePe

  • 我正在尝试安装Kafka Kafka和Zookeeper正在运行Apache Kafka tarball(v 0 . 0 . 9 ),在Docker映像中。 尝试使用提供的脚本消费/生产。并尝试使用自己的java应用程序进行生产。如果Kafka一切正常 以下是我在尝试生成时遇到的错误: Kafka属性测试 首先: 第二: 第三: 上一个: 这是我的“/etc/hosts” 我遵循了入门指南,如果我