Knox: Unable to access NiFi Service from Knox UI

Issue

User cannot access NiFi UI from Knox Web UI with these error messages:

An unexpected error has occurred

{"cause0":"javax.ws.rs.core.UriBuilderException: The provided context path [/gateway/cdp-proxy/nifi-app] was not registered as allowed []","message":"javax.ws.rs.core.UriBuilderException: The provided context path [/gateway/cdp-proxy/nifi-app] was not registered as allowed []","url":"/nifi-api/flow/current-user","status":"500"}

Caused

"The provided context path [/gateway/cdp-proxy/nifi-app] was not registered as allowed []"

Resolution

In NiFi > Configuration > nifi.web.proxy.context.path, replace default value with /gateway/cdp-proxy/nifi-app and restart all NiFi server

References