Dear Apache NiFi Community,

I am reaching out to report a potential bug in Apache NiFi 2.0 (and likely
2.1) related to stopping the application on Windows. During my testing on
Windows Server 2025 (Version 24H2, OS Build 26100.2314), I encountered an
issue where the 'bin/nifi.cmd start' command successfully starts NiFi, but
the 'bin/nifi.cmd stop' command fails. The following error is displayed
during the stop attempt:
org.apache.nifi.bootstrap.Command Application Process not running.

Upon investigation, I found that the issue seems to stem from the bootstrap
code responsible for looking up the application process. Specifically, the
problematic code can be found here:
StandardProcessHandleProvider.java#L73
<https://github.com/apache/nifi/blob/6b6e8d6f785ccb9f61fd4e8599dcdc855dd5965f/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/command/process/StandardProcessHandleProvider.java#L73>

At this line, the process arguments are expected to be present but are
actually empty on Windows, causing the application process handle to remain
unfound. Notably, this behavior is specific to Windows, as the same code
works as expected on Linux and macOS.

I also tested this issue using two different JDKs—Zulu 21 JDK and OpenJDK
21—and observed the same behavior in both cases.

A potentially related issue is described in JDK-8176725
<https://bugs.openjdk.org/browse/JDK-8176725>, where comments mention that
certain behaviors are platform-dependent. This could provide context for
the problem I’m experiencing.

Lastly, I would like to ask the community:
Has anyone tested Apache NiFi 2.0 on different Windows editions (Home, Pro,
Server)? If so, do the start/stop commands work as expected in those
environments?

Thank you for your time and any insights you can provide. I am happy to
assist further with debugging or testing if needed.

Best regards,
Balázs Gerner

Reply via email to