Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Access Dockerized NiFi UI from remote host

avatar
New Contributor

I'm trying to stand up a temporary NiFi server to support a proof of concept demo for a customer. For these types of short lived servers I like to use Docker when possible. I'm able to get the NiFi container up and running with out any issues but I can't figure out how to access its UI from the browser on a remote host. I've tried the following docker run variations:

docker run --name nifi \ -p 8080:8080 \ -d \ apache/nifi:latest


docker run --name nifi \ -p 8080:8080 \ -e NIFI_WEB_HTTP_PORT='8080' \ -d \ apache/nifi:latest


docker run --name nifi \ -p 8080:8080 \ -e NIFI_WEB_HTTP_HOST=${hostname-here} \ -e NIFI_WEB_HTTP_PORT='8080' \ -d \ apache/nifi:latest

My NiFi version is 1.8.0. I'm fairly certain that my problems are related to the host-headers blocker feature added to version 1.5.0. I've seen a few questions similar to mine but no solutions. Is it possible to access the NiFi UI from a remote host after version 1.5.0? Can host-headers blocker be disabled for a non-prod demo? Would a non-Docker install on my server present the same host-headers blocker issues? Should a use 1.4 for my demo and save myself a headache

1 REPLY 1

avatar
Contributor

@Edward Blair I had run nifi docker with docker-compose command. Below link has nice description how to run it.

https://github.com/apache/nifi/tree/master/nifi-docker/docker-compose

I had used command as below

docker-compose up --scale nifi=3 -d (this will spawn 3 node nifi cluster)

Since in container nifi is running on port 8080. We can get exposed port with below command.

docker-compose port nifi 8080

Above returns me o/p as

0.0.0.0:32773

So i can access nifi ui with below url

http://<hostname>:32773/nifi