admin管理员组

文章数量:1417686

I am trying to run a Docker container of Apache NiFi 2.0 using HTTP, but I am unable to do so

I have run this command:

docker run -d -p 8081:8081 -e NIFI_WEB_HTTP_PORT=8081 apache/nifi:2.0.0

But every time in logs, I get the following:

INFO [main] .apache.nifi.web.server.JettyServer Started Server on https://18b74a249482:8443/nifi

A few days back, even running docker run -d -P apache/nifi:2.0.0 was working fine, but now it is not

I am trying to run a Docker container of Apache NiFi 2.0 using HTTP, but I am unable to do so

I have run this command:

docker run -d -p 8081:8081 -e NIFI_WEB_HTTP_PORT=8081 apache/nifi:2.0.0

But every time in logs, I get the following:

INFO [main] .apache.nifi.web.server.JettyServer Started Server on https://18b74a249482:8443/nifi

A few days back, even running docker run -d -P apache/nifi:2.0.0 was working fine, but now it is not

Share Improve this question edited Jan 31 at 8:46 ARIJIT SINGH asked Jan 31 at 7:37 ARIJIT SINGHARIJIT SINGH 928 bronze badges 1
  • can you run docker container inspect docker-name? – silentsudo Commented Feb 3 at 11:15
Add a comment  | 

1 Answer 1

Reset to default 0

I could not run the NiFi on HTTP, but could run it on HTTPS using the following steps:

  1. Set NIFI_WEB_HTTPS_HOST=0.0.0.0 in my Dockerfile as an environment variable
  2. Set NIFI_REMOTE_INPUT_HOST=0.0.0.0 in my Dockerfile as an environment variable
  3. Set CMD ["./bin/nifi.sh", "run"] in my Dockerfile
  4. Created a container using the image (local_nifi:v2.0.0) with the command docker run -d -p 8443:8443 local_nifi:v2.0.0
  5. Created an SSH tunnel with my local system (Windows) using ssh -L 0.0.0.0:8443:127.0.0.1:8443 <user>@<ip>
  6. Ran https://localhost:8443/nifi in my browser and input the generated username and password (run docker logs <container id> | grep Generated to acquire the credentials)

本文标签: dockerRunning NiFi 20 using HTTPStack Overflow