Kafka - Section 0: Resources ποΈ
Table of Contents π
- π home
- ποΈ resources
- π links
- π kafka documentation
- π links
Description π
Resources for the Kafka Zero to Pro Guide. Has images, pdfs, and links to other resources.
Helpful Content π
This is a collection of helpful content for the Kafka Zero to Pro Guide. It is not a part of Kafka, but it is helpful for learning Kafka.
Kafka Setup 
Kafkas own quick start guide for setting up Kafka
If your lazy, or donβt want to leave these docs, you can use the quick start I made below.
-
get the java runtime environment (
jre)sudo apt install default-jre - get
kafka-
download kafka
wget https://dlcdn.apache.org/kafka/3.3.1/kafka_2.13-3.3.1.tgz -
extract the tar file
tar -xzf kafka_2.13-3.3.1.tgz -
move the extracted folder to your home directory
mv kafka_2.13-3.3.1 ~/
-
-
set up your environment variables
-
go to you
.bashrcor.profilefile and add the following linesexport KAFKA_BIN_ROOT="$HOME/kafka_2.13-3.3.1/bin" export KAFKA_CONFIG_ROOT="$HOME/kafka_2.13-3.3.1/config" PATH="$PATH:$KAFKA_BIN_ROOT:$KAFKA_CONFIG_ROOT" -
test your
environment variablesin a new terminalecho $KAFKA_BIN_ROOT echo $KAFKA_CONFIG_ROOT echo $PATH -
test to see if you can run
kafkacommands from anywherekafka-topics.sh
-
-
start up
Kafka(using KRaft)-
generate a cluster
UUIDKAFKA_CLUSTER_ID="$(kafka-storage.sh random-uuid)" -
format the log directories
kafka-storage.sh format -t "$KAFKA_CLUSTER_ID" -c "$KAFKA_CONFIG_ROOT/kraft/server.properties" -
start the server
kafka-server-start.sh $KAFKA_CONFIG_ROOT/kraft/server.properties - Kafka is now running, keep this terminal open
- logs are located in
/tmp/kraft-combined-logs, and can be configured in$KAFKA_CONFIG_ROOT/kraft/server.properties
-
Kafka Troubleshooting 
-
when running a command from the CLI and you get the following error
Warn [AdminCLient clientId=adminclient-1] Connection to node -1- this is a WSL2 networking issue
- stop the
Kafkaserver and either KRaft or Zookeeper (depending on which you are using) -
then run the following commands
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 -
then go to the
Kafkaconfig fileserver.properitesand change thelistenerstoPLAINTEXT://localhost:9092cd $KAFKA_CONFIG_ROOTnano server.propertieslisteners=PLAINTEXT://localhost:9092 - then start the
Kafkaserver and either KRaft or Zookeeper (depending on which you are using)
- stop the
- this is a WSL2 networking issue