Spin up Kafka Broker and Zookeeper on Docker

  Рет қаралды 16,980

Hussein Nasser

Hussein Nasser

Күн бұрын

Пікірлер: 27
@anl6777
@anl6777 Жыл бұрын
I'm saying it after a lot of try: It's still the easist way to spin up a healthy kafka server in 2023!
@worldwide6626
@worldwide6626 Жыл бұрын
Is plaintext enough?
@rsantamaria2309
@rsantamaria2309 2 жыл бұрын
Thanks for all those explanations. You are excellent. And I like when you talk about « Listeners » that is also the way I prononce it in my head when I am writing. Thanks again.
@erwinrommel5593
@erwinrommel5593 3 жыл бұрын
How do you configure the topic inside your kafka could you show that
@thedrunkencatlady
@thedrunkencatlady 4 жыл бұрын
Thank you so much for the simple tutorial!! ☺☺
@hnasr
@hnasr 4 жыл бұрын
🙏🙏
@meliscolak1303
@meliscolak1303 3 жыл бұрын
thank you so much!
@seriouslycurious
@seriouslycurious 4 жыл бұрын
My Kafka instance is unable to connect with zookeeper. tried machine name as well as localhost. Any other options ? Here is the error - [main-SendThread(localhost:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) [main-SendThread(localhost:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket error occurred: localhost/127.0.0.1:2181: Connection refused
@seriouslycurious
@seriouslycurious 4 жыл бұрын
adding --net host resolved the issue, was able to pass the IP from zookeeper's startup log
@WMay116
@WMay116 4 жыл бұрын
@@seriouslycurious I am having the same issue. can you post your full docker command please?
@divyanshagarwal993
@divyanshagarwal993 4 жыл бұрын
I used the following commands: 1. For running zookeeper: docker run --net host --name zookeeper -p 2181:2181 zookeeper 2. For running kafka broker: docker run --net host --name kafka -p 9092:9092 -e KAFKA_ZOOKEEPER_CONNECT=localhost:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 confluentinc/cp-kafka I don't get any errors when running the 2 containers and I used brokers: ['localhost:9092'] in my code. But still it doesn't work. It shows an error: "ERR refused connection to broker" something like that Can someone help?
@lillllliiill-r3e
@lillllliiill-r3e 4 жыл бұрын
@@divyanshagarwal993 change KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 to. KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://YOUR_IP_ADDRESS:9092 because localhost refers to your host machine but since you are using docker, now it means localhost refers to your kafka container. Change localhost to your host machine's IP
@leniedor733
@leniedor733 2 жыл бұрын
@@lillllliiill-r3e Nasty solution but works,it happened a few years to me xD An alternative for your ip (which is equivalent at your network context) --network="host"
@onhazrat
@onhazrat Жыл бұрын
🎯 Key Takeaways for quick navigation: 00:01 🐘 To set up Zookeeper and Kafka in Docker, ensure you have Docker installed. 00:30 🚀 Use `docker run` to spin up a Zookeeper instance, provide a container name, and expose port 2181. 01:10 📡 For Kafka, expose port 9092, set environment variables for Zookeeper connection, and advertised listener. 03:25 💡 Kafka broker requires environment variables for Zookeeper connection and advertised listener. 07:48 🔄 Configure Kafka replication factor if running a single broker to avoid confusion. Made with HARPA AI
@abusufiyanathani2393
@abusufiyanathani2393 Жыл бұрын
I am getting an error saying zookeeper audit is disabled, can anyone help me..
@weitanglau162
@weitanglau162 3 жыл бұрын
Great video! Can you also make a video on deployment on kubernetes as well?
@PiyushKumar-od6ei
@PiyushKumar-od6ei 3 жыл бұрын
Can one video happen using Docker Swarm?
@tSobota
@tSobota 4 жыл бұрын
Hi Hussein, thanks for your video :) How about one RPC stack video? Thrift or gRPC. How the hell it works internally? :D
@hnasr
@hnasr 4 жыл бұрын
Love it! gRPC is one of the most requested videos in the channel. Its coming
@rahulkumarsingh1716
@rahulkumarsingh1716 4 жыл бұрын
I am getting an error while connecting kafka to zookeeper, it says connection refused.. What to do?
@The-Cat
@The-Cat 4 жыл бұрын
me too it's frustrating.... have you found the solution after 4 months ?
@jannielouwrens1210
@jannielouwrens1210 4 жыл бұрын
@@The-Cat Try starting both the zookeeper and the kafka containers with the --net=host switch, e.g. docker run --name zookeeper -p 2181:2181 --net=host zookeeper
@faisalaleissa2012
@faisalaleissa2012 3 жыл бұрын
. Will not attempt to authenticate using SASL (unknown error)
@oluwaseyisoremekun5729
@oluwaseyisoremekun5729 3 жыл бұрын
Add -net=host to the docker command that runs kafka
@AhmadEzzeir
@AhmadEzzeir 4 жыл бұрын
Can we find web ui admin for it Thanks
@AhmadEzzeir
@AhmadEzzeir 4 жыл бұрын
Basil S thanks
Running Kafka on Docker with Compose
19:24
That DevOps Guy
Рет қаралды 26 М.
Apache Kafka Architecture
11:19
Anton Putra
Рет қаралды 40 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 168 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 33 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 51 МЛН
Spin up Redis on Docker and learn basic commands
9:47
Hussein Nasser
Рет қаралды 39 М.
Where http2 hits its limit
13:13
Hussein Nasser
Рет қаралды 6 М.
Fail-over and High-Availability (Explained by Example)
19:21
Hussein Nasser
Рет қаралды 58 М.
What is Kafka and How does it work?
15:04
Hussein Nasser
Рет қаралды 147 М.
So einfach ist Docker
16:14
c't 3003
Рет қаралды 164 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 274 М.
How many kernel system calls do runtimes make?
19:18
Hussein Nasser
Рет қаралды 30 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 168 МЛН