0

I am trying to install Kafka in WSL2.

I am referring this DigitalOcean blog, but I am stuck when trying to start Kafka using the command:

sudo systemctl start kafka

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

I have researched and found WSL2 does not come with systemd. Is there an alternative to install systemd services supported in WSL2?

If not, is there a way to install Kafka on Windows?

Andrzej Sydor
  • 1,373
  • 4
  • 13
  • 28
Ayman Patel
  • 564
  • 2
  • 8
  • 23
  • There are so many reasons why systemd sucks: https://sysdfree.wordpress.com/2020/01/05/294/, https://lwn.net/Articles/777595/, https://news.ycombinator.com/item?id=18873851... Look here forInstalling Kafka on Other WSL: https://www.oreilly.com/library/view/kafka-the-definitive/9781491936153/app01.html – paulsm4 Dec 06 '20 at 01:20

1 Answers1

0

You can use the provided kafka-server-start script , otherwise you'd need to create a Windows Service, assuming you're trying to get the server to start up along with the booting the machine.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245