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.
| Port number | 2181 |
|---|---|
| Service | Apache ZooKeeper client port |
| Protocol | TCP |
| Category | Infrastructure & orchestration |
| Default encryption | No |
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.