[ 
https://issues.apache.org/jira/browse/NIFI-14458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943204#comment-17943204
 ] 

Phil Dicke edited comment on NIFI-14458 at 4/10/25 12:54 PM:
-------------------------------------------------------------

[~exceptionfactory] Thank you for the quick response.  That was my post in the 
developers' mailing list ( 
[https://lists.apache.org/thread/n9byfj28dm1hmnvr959xto5yckymnvw6] ) for which 
I did not receive any responses. 

I've determined the easiest way to implement Apache ProcRun with NiFi is using 
exe mode with the nifi.cmd script.  While this doesn't use the java features of 
ProcRun and launches 3 processes (cmd.exe, java, java) as opposed to one java 
process (which would be ideal), it requires no extra java code or .jar file to 
be built or maintained.  I also have this working now :).

Thank you for the advice, I will implement the run command in nifi.cmd.

I'll also attach my code for creating the service for those that find the 
ticket in the future.  I'll probably also submit a Pull Request to the 
nifi-windowsservice project, but that doesn't seem to be an active project 
right now.


was (Author: philci52):
[~exceptionfactory] Thank you for the quick response.  That was my post in the 
developers' mailing list ( 
[https://lists.apache.org/thread/n9byfj28dm1hmnvr959xto5yckymnvw6] ) for which 
I did not receive any responses. 

I've determined the easiest way to implement Apache ProcRun with NiFi is using 
exe mode with the nifi.cmd script.  While this doesn't use the java features of 
ProcRun and launches 3 processes (cmd.exe, java, java) as opposed to one java 
process (which would be ideal), it requires no extra java code or .jar file to 
be built or maintained.  I also have this working now :).

Thank you for the advice, I will implement the run command in nifi.cmd.

I'll also attach my code for creating the service for those that find the 
ticket in the future.  I'll probably also submit a Pull Request to the 
nifi-windowservice project, but that doesn't seem to be an active project right 
now.

> Cannot use nifi.cmd to start nifi process in the foreground
> -----------------------------------------------------------
>
>                 Key: NIFI-14458
>                 URL: https://issues.apache.org/jira/browse/NIFI-14458
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 2.3.0
>         Environment: Windows 10, java 21
>            Reporter: Phil Dicke
>            Priority: Minor
>
> The current nifi.cmd script, cannot be used to start nifi in the foreground.  
> The script checks for the "start" command and launches the process in the 
> background.
> While this is convenient for using a typical shell user, it does not work for 
> integrating the Apache ProcRun ( 
> [https://commons.apache.org/proper/commons-daemon/procrun.html] ) and running 
> the application as a Windows Service using exe mode.
> Obviously, I can just copy and edit nifi.cmd to start the processes in the 
> foreground, but I would prefer a more elegant solution.
> I'm proposing that I add a new command "startfg" to the nifi.cmd that will 
> start the nifi process in the foreground.  I'd like to get some feedback 
> before I implement this.  Is there a better option?
> [~exceptionfactory] 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to