Zookeeper opens additional random high port

Viewed 255

I see that on each node, zookeeper opened a random high port that is listening on all interfaces. How can I disable it?

Here is my zoo.cfg file

# 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

Here is what netstat shows:

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     

Since I can't know what port will be chosen once zookeeper starts, I can't firewall it.

Zookeeper version is: 3.6.2

1 Answers
Related