Skip to content

MINOR: Improve the KAFKA_HEAP_OPTS definition while run kafka-server-start.bat Batch #19703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

realFranco
Copy link

Info

  • Remove the wmic dependency while run kafka-server-start.bat script in order to defined the KAFKA_HEAP_OPTS if is not previously defined.

Why

  • If the host machine do not have the wmic dependency, the execution will gonna fail;
  • If the host machine contains restrictions about the way of:
    • install dependencies;
    • environment variables;
    • PATH modifications the Kafka service won't start.

Evidence

# powershell
systeminfo

Host Name: ...
OS Name: ... Microsoft Windows 11 Enterprise
OS Version: ... 10.0.26100 ...

...

System Type: ... x64-based PC

...

A way of execute Kafka (one of the possible many ways) and the error expected:

# powershell
cd C:\directory\kafka; .\bin\windows\kafka-server-start.bat .\config\server.properties
'wmic' is not recognized as an internal or external command,
operable program or batch file.

After apply the contribution we have Kafka working as expected.

Disclaimer

UNIX user here, I do not invest to much time about the collateral damage and/or why the wmic is required.

@github-actions github-actions bot added triage PRs from the community small Small PRs labels May 13, 2025
@realFranco
Copy link
Author

"The Windows Management Instrumentation Command line (WMIC) was deprecated in 2016."

See: https://techcommunity.microsoft.com/blog/windows-itpro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/4039242.

Maybe it is a good time to introduce some updates 🫶

Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-attention small Small PRs triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant