Port 2181: ZooKeeper

Port 2181 is the client port for Apache ZooKeeper, a coordination service that older Kafka clusters and other distributed systems use to elect leaders and store configuration. Newer Kafka versions can run without ZooKeeper, but it remains common in existing deployments.

TCPInfrastructure & orchestrationUnencrypted by default
Port number2181
ServiceApache ZooKeeper client port
ProtocolTCP
CategoryInfrastructure & orchestration
Default encryptionNo
Security note. Port 2181 is not encrypted by default. Restrict it to trusted networks, or use an encrypted alternative where one exists, to avoid exposing credentials and data in transit.

Frequently asked questions

What is port 2181 used for?

Port 2181 is the client port for Apache ZooKeeper, a coordination service that older Kafka clusters and other distributed systems use to elect leaders and store configuration. Newer Kafka versions can run without ZooKeeper, but it remains common in existing deployments.

Is port 2181 TCP or UDP?

Port 2181 (ZooKeeper) uses TCP.

Is port 2181 secure?

Port 2181 is not encrypted by default. Where possible, use an encrypted alternative or tunnel it over TLS or a VPN.

Should I open port 2181 on my firewall?

Only if you specifically need ZooKeeper. Expose it to the smallest set of trusted sources, and never open database or Windows-service ports to the whole internet.