Created 03-31-2023 01:23 PM
I had a 3 node NiFi cluster and created a NiFi registry client with this a URL that goes through Knox and looks something like this https://xyz.com/gateway/registry/nifi-registry-app/nifi-registry-api. However, when I restart NiFi the registry client in NiFi strips the URL path so it comes back as https://xyz.com which isn't correct and can't connect to the registry.
Has anyone experienced this before and/or solved this issue?
Created 04-06-2023 11:55 AM
@drewski7
I have not been able to reproduce the NiFi Registry URL truncation yet using Apache NiFi 1.19 I have installed.
Couple things to check/try:
1. Apache NiFi 1.16.0 is about the time NiFi switched to using the flow.json.gz to load the flow in to memory at startup. Every time you make a change via the NiFi Ui, the current flow.json.gz is archived and new flow.json.gz is created. After fixing your NiFi-Registry URL, go inspect the flow.json.hgz file and see if the URL is being truncated when being persisted out to the flow.json.gz file. This file is only read at startup to load the flow back into NiFi's heap memory. The Registry clients will be at very beginning of the flow.json.gz
2. Try adding the port to the URL and see if that makes a difference (https://xyz.com:443/gateway/registry/nifi-registry-app/nifi-registry-api ).
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 04-06-2023 05:32 AM
Can anyone help with this? I am using NiFi v1.16.
Created 04-06-2023 06:26 AM
@drewski7
Why are you connecting your NiFi to NiFi-Registry via Knox instead of directly[y connecting to the NiFi-registry host?
NiFi will authenticate via a mutual TLS exchange using the keystore and truststores configured in nifi.properties and the nifi-registry.properties files.
Thanks,
Matt
Created on 04-06-2023 10:09 AM - edited 04-06-2023 11:45 AM
@MattWho
We have two separate CDP clusters set up. One cluster is our administration cluster (ie source of truth) that houses things like all of our NiFi Flows in the NiFi Registry. We want the other cluster or clusters to get access to these flows from their NiFi environments. However, the only way to get access to that administration NiFi Registry externally is through Knox.
Right now I set up all the topologies and authentication/authorization needed to do so but on restart of NiFi it strips the URL path in the Registry Client for Knox endpoint which I have to manually add back each time.
Created 04-06-2023 11:55 AM
@drewski7
I have not been able to reproduce the NiFi Registry URL truncation yet using Apache NiFi 1.19 I have installed.
Couple things to check/try:
1. Apache NiFi 1.16.0 is about the time NiFi switched to using the flow.json.gz to load the flow in to memory at startup. Every time you make a change via the NiFi Ui, the current flow.json.gz is archived and new flow.json.gz is created. After fixing your NiFi-Registry URL, go inspect the flow.json.hgz file and see if the URL is being truncated when being persisted out to the flow.json.gz file. This file is only read at startup to load the flow back into NiFi's heap memory. The Registry clients will be at very beginning of the flow.json.gz
2. Try adding the port to the URL and see if that makes a difference (https://xyz.com:443/gateway/registry/nifi-registry-app/nifi-registry-api ).
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 04-10-2023 06:28 AM
Switching to a new version of NiFi solved the problem.