0

After installing the Apache NiFi service on the AWS cloud server and successfully starting it, when accessing the NiFi service on the remote cloud server from the local computer, the following error was encountered

System Error

The request contained an invalid host header [<ip>:8443] in the request [/nifi]. 
Check for request manipulation or third-party intercept.

Valid host headers are [empty] or:
    127.0.0.1
    127.0.0.1:8443
    localhost
    localhost:8443
    [::1]
    [::1]:8443
    ip-172-31-7-174.us-east-2.compute.internal
    ip-172-31-7-174.us-east-2.compute.internal:8443
    172.31.7.174
    172.31.7.174:8443
    0.0.0.0
    0.0.0.0:8443

Server: Ubuntu_20.4 (ARM64)

Java:

# java -version
java version "1.8.0_371"
Java(TM) SE Runtime Environment (build 1.8.0_371-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode)

Apache NiFi: 1.22.0

NiFi config:

nifi.web.https.host=0.0.0.0
nifi.web.https.port=8443

Security group 8443 port has been opened

How to solve this problem?

Erwin
  • 57
  • 2
  • 7

1 Answers1

0

Set a proxy address in the configuration file conf/nifi.properties

nifi.web.proxy.host=<your-server-ip>:8443

Reference Documents: https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#proxy_configuration

Erwin
  • 57
  • 2
  • 7