- A CentOS machine (or similar Linux host) with network access to download Kafka binaries.
- All start/stop scripts are in the
bindirectory. - Default configuration files live in
config.
bin and list ZooKeeper scripts:
Step 3 — Inspect the default ZooKeeper config
The default ZooKeeper configuration file is
config/zookeeper.properties. List the config directory:
zookeeper.properties:
- Client port (default:
2181) - Data directory (
dataDir) - Clustering settings (if running an ensemble)
bin directory.
Example — start from Kafka root:
bin directory:
zookeeper.properties matches your current working directory.
ZooKeeper startup logs (stdout) include lines such as:
By default ZooKeeper listens on port 2181 (the client port). Kafka connects to ZooKeeper on that port unless you change
zookeeper.connect in Kafka’s server.properties.server.properties. By default it contains:
- If Kafka cannot connect to ZooKeeper, it will fail during broker initialization. Confirm:
- ZooKeeper is running and reachable on the address in
zookeeper.connect. - Network/iptables allow traffic to port
2181. - The
server.propertiesandzookeeper.propertiesfile paths are correct when launching the scripts.
- ZooKeeper is running and reachable on the address in
- Downloading and extracting Kafka binaries
- Locating ZooKeeper startup scripts and configuration files
- Starting ZooKeeper and verifying it binds to port 2181
- Starting the Kafka broker and confirming it connects to ZooKeeper