首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Zookeeper打开额外的随机高端口

Zookeeper打开额外的随机高端口
EN

Stack Overflow用户
提问于 2020-09-24 18:19:19
回答 1查看 157关注 0票数 2

我看到在每个节点上,zookeeper打开了一个随机的高端口,该端口监听所有接口。如何将其禁用?

这是我的zoo.cfg文件

代码语言:javascript
复制
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/var/lib/zookeeper
# Place the dataLogDir to a separate physical disc for better performance
# dataLogDir=/disk2/zookeeper

admin.enableServer=false
autopurge.snapRetainCount=3
autopurge.purgeInterval=1
standaloneEnabled=false

# the port at which the clients will connect
clientPort=2181
clientPortAddress=192.168.0.102

# specify all zookeeper servers
# The fist port is used by followers to connect to the leader
# The second one is used for leader election
server.1=192.168.0.101:2888:3888
server.2=192.168.0.102:2888:3888
server.3=192.168.0.10:2888:3888


snapCount=100000

以下是netstat显示的内容:

代码语言:javascript
复制
tcp6       0      0 192.168.0.102:3888      :::*                    LISTEN      21444/java              
tcp6       0      0 :::42433                :::*                    LISTEN      21444/java          
tcp6       0      0 192.168.0.102:2181      :::*                    LISTEN      21444/java     

因为我不知道zookeeper启动后会选择哪个端口,所以我不能对其进行防火墙。

Zookeeper版本为: 3.6.2

EN

回答 1

Stack Overflow用户

发布于 2020-10-08 19:00:23

我也在调查同样的事情,在这里得到了一些信息。

http://zookeeper-user.578899.n2.nabble.com/Zookeeper-listening-to-ports-other-than-clientPort-and-server-x-ports-td7580137.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64044379

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档