Installing Apache NiFi 2.x on Windows Complete Step-by-Step Guide (with Fixes)

 

Installing Apache NiFi 2.x on Windows Complete Step-by-Step Guide (with Fixes)



Apache NiFi 2.x introduced major architectural changes compared to 1.x, including HTTPS-by-default security and a new internal management server.
Because of these changes, a simple unzip-and-run on Windows often fails with startup errors.

This guide walks through the complete installation and troubleshooting process to get NiFi 2.x running locally on Windows.


1️⃣ Install Java 21 (Required for NiFi 2.x)

NiFi 2.x requires Java 21+.

Download

https://adoptium.net/temurin/releases/?version=21

Install and set environment variables.

Set JAVA_HOME

System Environment Variables:

JAVA_HOME=C:\Program Files\Java\jdk-21

Add to PATH:

%JAVA_HOME%\bin

Verify

java -version

Expected:

openjdk version "21"

2️⃣ Download Apache NiFi 2.x

Official site:
https://nifi.apache.org/download/

Download:

nifi-2.x.x-bin.zip

Extract to:

E:\nifi\nifi-2.7.2

3️⃣ First Start Attempt (Typical Failure)

Run:

cd E:\nifi\nifi-2.7.2\bin
nifi.cmd start

Typical error in logs:

Management Server Address System Property not valid [127.0.0.1:?????]

This happens because NiFi 2.x requires a management endpoint that is not configured by default on Windows installs.


4️⃣ Fix NiFi 2.x Management Server (CRITICAL)

Open:

E:\nifi\nifi-2.7.2\conf\bootstrap.conf

Add at bottom:

java.arg.50=-Dorg.apache.nifi.management.server.address=127.0.0.1:9090

Why this is required:

NiFi 2.x runs:

  • Web UI server

  • Internal management server

If this property is missing, NiFi inserts a placeholder (?????) and refuses to start.


5️⃣ Start NiFi Successfully

nifi.cmd start

If HTTPS is enabled (default), open:

https://localhost:8443/nifi

You should now see the NiFi UI.


6️⃣ Set NiFi Username & Password (Windows Fix)

NiFi 2.x uses single-user auth by default.

Official command:

nifi.cmd set-single-user-credentials <username> <password>

However, the Windows script contains a quoting bug.

Fix nifi.cmd

Open:

E:\nifi\nifi-2.7.2\bin\nifi.cmd

Find:

set "CREDENTIALS=^"%~2^" ^"%~3^""
call "%JAVA_EXE%" ... SetSingleUserCredentials %CREDENTIALS%

Replace with:

call "%JAVA_EXE%" %JAVA_PARAMS% %PROPERTIES_FILE_PROPERTY% org.apache.nifi.authentication.single.user.command.SetSingleUserCredentials "%~2" "%~3"

7️⃣ Set Credentials

Stop NiFi first:

nifi.cmd stop

Set credentials (password ≥ 12 chars):

nifi.cmd set-single-user-credentials admin Admin@123456

Start again:

nifi.cmd start

8️⃣ Login to NiFi

Open:

https://localhost:8443/nifi

Credentials:

Username: admin
Password: Admin@123456

9️⃣ Verify Credentials Updated

Check:

E:\nifi\nifi-2.7.2\conf\login-identity-providers.xml

You should see:

<property name="Username">admin</property>

1️⃣0️⃣ Final Working Setup

NiFi 2.x running locally on Windows with:

  • Java 21

  • HTTPS enabled

  • Management server configured

  • Single-user auth working


Common NiFi 2.x Windows Issues

IssueCauseFix
Management server ?????Missing bootstrap settingAdd java.arg
Credential command failsWindows quoting bugFix nifi.cmd
Password error ??<12 charsUse longer
HTTPS not openingCert not trustedAccept browser warning

Conclusion

NiFi 2.x is significantly more secure than 1.x, but the new architecture requires a few manual steps on Windows:

  1. Install Java 21

  2. Configure management server

  3. Fix credential script

  4. Set username/password

Once configured, NiFi runs reliably with full HTTPS security.


If you found this helpful, feel free to share or reach out with NiFi questions.

Next Post Previous Post
No Comment
Add Comment
comment url