You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Eric Porter (Jira)" <ji...@apache.org> on 2021/12/09 18:54:00 UTC
[jira] [Updated] (NIFI-9469) Context path issue when NiFi is served behind proxy server
[ https://issues.apache.org/jira/browse/NIFI-9469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Porter updated NIFI-9469:
------------------------------
Description:
After upgrading to NiFi 1.15.0 we noticed that we could no longer reach nifi on the root context path. The error we were seeing follows:
{code:java}
javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[]] {code}
Our nifi.web.proxy.context.path was set to:
{code:java}
nifi.web.proxy.context.path=/{code}
To troubleshoot, we added /nifi to the nifi.web.proxy.context.path property and changed our X-ProxyContextPath proxy setting to "/nifi" and found that we could load nifi.
{code:java}
nifi.web.proxy.context.path=/nifi,/
X-ProxyContextPath "/nifi"{code}
However, leaving X-ProxyContentPath set to "/" and setting nifi.web.proxy.context.path=/,/nifi resulted in the same error, but helped us to discover that there seems to be an issue with parsing the single '/' character from the nifi.web.proxy.context.path setting.
{code:java}
javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[/nifi, ]] {code}
After trying different escaping methods, were able to work around this issue by using the following setting:
{code:java}
nifi.web.proxy.context.path=// {code}
was:
After upgrading to NiFi 1.15.0 we noticed that we could no longer reach nifi on the root context path. The error we were seeing follows:
{code:java}
javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[]] {code}
Our nifi.web.proxy.context.path was set to:
{code:java}
nifi.web.proxy.context.path=/{code}
To troubleshoot, we added /nifi to the nifi.web.proxy.context.path property and changed our X-ProxyContextPath proxy setting to "/nifi" and found that we could load nifi.
{code:java}
nifi.web.proxy.context.path=/nifi,/
X-ProxyContextPath "/"{code}
However, leaving X-ProxyContentPath set to "/" and setting nifi.web.proxy.context.path=/,/nifi resulted in the same error, but helped us to discover that there seems to be an issue with parsing the single '/' character from the nifi.web.proxy.context.path setting.
{code:java}
javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[/nifi, ]] {code}
After trying different escaping methods, were able to work around this issue by using the following setting:
{code:java}
nifi.web.proxy.context.path=// {code}
> Context path issue when NiFi is served behind proxy server
> ----------------------------------------------------------
>
> Key: NIFI-9469
> URL: https://issues.apache.org/jira/browse/NIFI-9469
> Project: Apache NiFi
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.15.0
> Environment: CentOS 7, openjdk version "1.8.0_312"
> Reporter: Eric Porter
> Priority: Minor
> Labels: proxy
>
> After upgrading to NiFi 1.15.0 we noticed that we could no longer reach nifi on the root context path. The error we were seeing follows:
> {code:java}
> javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[]] {code}
> Our nifi.web.proxy.context.path was set to:
> {code:java}
> nifi.web.proxy.context.path=/{code}
> To troubleshoot, we added /nifi to the nifi.web.proxy.context.path property and changed our X-ProxyContextPath proxy setting to "/nifi" and found that we could load nifi.
> {code:java}
> nifi.web.proxy.context.path=/nifi,/
> X-ProxyContextPath "/nifi"{code}
> However, leaving X-ProxyContentPath set to "/" and setting nifi.web.proxy.context.path=/,/nifi resulted in the same error, but helped us to discover that there seems to be an issue with parsing the single '/' character from the nifi.web.proxy.context.path setting.
> {code:java}
> javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[/nifi, ]] {code}
> After trying different escaping methods, were able to work around this issue by using the following setting:
> {code:java}
> nifi.web.proxy.context.path=// {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)