You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Zoltán Kornél Török (Jira)" <ji...@apache.org> on 2025/04/14 07:30:00 UTC
[jira] [Created] (NIFI-14477) Nifi throws error for api calls which perform throught knox proxy
Zoltán Kornél Török created NIFI-14477:
------------------------------------------
Summary: Nifi throws error for api calls which perform throught knox proxy
Key: NIFI-14477
URL: https://issues.apache.org/jira/browse/NIFI-14477
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 2.3.0
Reporter: Zoltán Kornél Török
Assignee: Zoltán Kornél Török
Fix For: 2.4.0
*Problematic scenario*
Our system work behind a knox proxy, where we perform nifi api calls. When we do, nifi return back an error (in this example we want to create a process group):
{code:java}
Caused by: org.springframework.web.client.HttpClientErrorException$Conflict: 409 Conflict: [Node ztorok-test-dfx-2-nifi-2-datahub-nifi1.ztorok-t.svbr-nqvp.int.cldr.work:8443 is unable to fulfill this request due to: {
"message":"Transfer-Encoding and Content-Length",
"url":"https://ztorok-test-dfx-2-nifi-2-datahub-nifi1.ztorok-t.svbr-nqvp.int.cldr.work:8443/nifi-api/process-groups/root/process-groups",
"status":"400"
}] {code}
If the same request go directly to a nifi node, we didn't experienced any problem.
*What cause this problem?*
This problem happens, because the jetty library perform some compliance validation for every http request before process it. Http protocol not allow it that Transfer-encoding and content-length both present on the http request, but older http clients violate that rule, and that is happening when knox connect to nifi too.
Related jetty code: [https://github.com/jetty/jetty.project/blob/jetty-12.0.x/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java#L1104]
*Proposed solution*
Jetty give us option to configure compliance options - [https://jetty.org/docs/jetty/12/programming-guide/server/compliance.html]
I would like to introduce a new nifi property, where users can able to configure compliance, if they needed. Default that property would be empty, which means nifi use the jetty provided default compliance (currently it is RFC7230).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)