0

Initially I was using official Nifi-registry image of Apache. I used the official docker file and created new nifi-registry image. On deploying it in the cluster I'm getting the following error and the pod doesnot spin up.

2023-02-22 14:32:54,459 INFO [main] o.a.n.r.provider.StandardProviderFactory Instantiated FlowPersistenceProvider with class name org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider 2023-02-22 14:32:54,464 INFO [main] o.a.n.r.p.flow.git.GitFlowMetaData ./flow_git is not a directory or does not exist.

git configaration has been given in the values file of nifi registry.

I tried building the docker file whithout any change provided in the official git repo and I was not getting any error. I use another java image as base image and I'm getting the error

Nifi-registry previous: 1.17.0 Nifi-registry present: 1.19.0 No DB

I will be forever grateful if anyone can help me

2 Answers2

0

You need to configure Airflow to use SSL/TLS when connecting to the database

Follow this document for the configuration steps to enable SSL/TLS and to generate the certificates. Once the above steps have been completed you need to configure Airflow to use SSL/TLS and it will look like for example: ‘postgresql+psycopg2://user:password@hostname:port/database? ss;mode=require&sslroorcert=/path/to/server.crt&sslkeys=/path/to/client.key&sslcert=/path/to/client.crt’

By using kubernetes secret to mount the certificates into the Airflow pod adn set the necessary environment variables in the Airflow pod’s deployment YAML file and point it to the certificates. Steps could vary depending on the environment. Also check this alternate document from postgresql your reference.

  • Thanks for adding your comments. But sorry to say that I didn't get it correctly. Airflow has nothing to do with Nifi-registry right? For Nifi-registry we are not configuring any Databases. We only add a git repo. When I add a new repo, i don't have any issues. Only issue is when adding the old repo. If I'm wrong please feel to correct me. Thanks – Alexy Pulivelil Feb 25 '23 at 05:25
  • Hi Alex, Yes, Airflow and Nifi Registry are separate tools and don't have any relationship. Here the problem is the directory where you are storing; either not accessible or does not exist. Directory you have configured and the Git repository directory should be accessible from within the container and check NiFi registry logs. – Abhijith Chitrapu Feb 28 '23 at 02:28
  • Hi Abhijith, Thanks for the comment. I do check the logs. When using official image its not causing any such issues. This error comes only when creating a new image using our own java image. I'm not sure why this strange issue is happening. – Alexy Pulivelil Mar 01 '23 at 09:37
  • If you are experiencing the issue only when creating a new image means these could be the possibilities. There could be some differences in the environment or dependencies between your Java image and official image; Java image may not include all the required dependencies for NiFi Registry, finally difference in your configuration with Dockerfile. – Abhijith Chitrapu Mar 02 '23 at 09:06
0

Hi I have downgraded my Nifi registry version to 1.17.0. now I'm able to deploy the new image without any error.

But have a problem with Nifi. I deployed new image in one of my cluster, on creating a processor group in Nifi I can do import from Nifi registry and create a new bucket with flow.

But on deploying this same image in the another cluster import from Nifi registry works fine. Creation of new buckets with new flow is taking some time. In some case I have to delete the pod of Nifi registry to get this done. Both nifi and Nifi registry pods are in the same namespace . No DB and PV for Nifi registry.

Any idea what might be causing this issue.