5

I have preconfigured zookeeper and kafka using the following link used follow link : https://dzone.com/articles/running-apache-kafka-on-windows-os
After making all the changes, I execute this command in cmd prompt :

.\bin\windows\kafka-server-start.bat .\config\server.properties

but the following error is thrown :

'wmic' is not recognized as an internal or external command, operable program or batch file.       

Can someone help me ?

Christophe Quintard
  • 1,858
  • 1
  • 22
  • 30
Anoop
  • 71
  • 1
  • 1
  • 6
  • 1
    wmic is in the System32 folder (C:\windows\system32\wbem) . Can you check if it is added to your PATH variable? `PATH=C:\Windows\System32\wbem;etc...` – xvf Mar 02 '17 at 18:44
  • Yes its already added but still didn't worked. – Anoop Mar 03 '17 at 05:16

3 Answers3

7

I had similar issue. I added C:\Windows\System32\wbem to path.

Now I am not getting the same error but no logs are getting printed after starting kafka-server.

Kafka server not returning anything

Steve Piercy
  • 13,693
  • 1
  • 44
  • 57
darshan kamat
  • 374
  • 7
  • 23
1

This is because WMIC internally runs other OS commands. For this C:\Windows\System32 must be set in Classpath. If this is missing, nothing gets displayed when starting Kafka server.

1

go to System environment variables form control panel, edit PATH and append below to existing path value separated by ;

C:\Windows\System32\wbem;%PATH%;

after setting PATH in env variables, confirm whether wmic is picked properly:

open command prompt and type below command

where wmic

This should return the following as output:

"C:\Windows\System32\wbem\WMIC.exe"