Apache NiFi Windows Service Wrapper
Wrapper for running Apache NiFi as a Windows service. This wrapper is using the Apache Commons ProcRun daemon (like Tomcat).
- Maven 3.3+
- Java 1.8
- Apache NiFi
- Download and build Apache NiFi using maven. This project needs
nifi-bootrapto compile and run, or at least that jar file. - The file
pom.xmlcontains a property for the NiFi version. Adjust as necessary before building. - Download the source and run:
mvn install. An output directory will be created at$root/Dist.
- Copy the
nifi-windowsservice.VERSION.jarfile into NiFi's /lib/bootstrap directory. - Copy everything in
/dist/binto NiFi's/binfolder. - Execute
/bin/install_service.bat. - The service will show up in the service controll manager as "Apache NiFi", with a service name of "nifi-service".
- If you need to run service as user other than system account, you may need to set JAVA_HOME environment variable that new user can see (e.g. as a system variable).
- You may need to grant permissions (full access) to service run-as user to entire nifi installation folder.
Uninstallation can be done in two ways:
- Execute the Windows service manager commands
sc delete nifi-service. - Run the command
/bin/nifi-service.exe //DS//nifi-service
- When NiFi starts up, it unpacks all jars. This may take some time. If you issue the stop command during this time, it may take a while for the service to stop. The apache daemon may even terminiate the process if it is taking too long, but rest assured, the shutdown has been properly initiated.