Support Questions

Find answers, ask questions, and share your expertise

NiFi Registry Client Stripping URL path on Restart

avatar
Expert Contributor

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?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@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

View solution in original post

5 REPLIES 5

avatar
Expert Contributor

Can anyone help with this? I am using NiFi v1.16.

avatar
Master Mentor

@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

avatar
Expert Contributor

@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.

avatar
Master Mentor

@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

avatar
Expert Contributor

Switching to a new version of NiFi solved the problem.