Member since
07-30-2019
3387
Posts
1617
Kudos Received
999
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 100 | 11-05-2025 11:01 AM | |
| 364 | 10-20-2025 06:29 AM | |
| 504 | 10-10-2025 08:03 AM | |
| 350 | 10-08-2025 10:52 AM | |
| 380 | 10-08-2025 10:36 AM |
04-25-2025
06:47 AM
@Shrink So I see you are trying to start a Process Group (which starts all the NiFi components within that process group). You are not setup with a production ready certificate nor production ready authentication and authorization configuration which makes setting up the necessary authorizations not possible. You would need to switch to using the managed authorizer which allow you to use the file-user-group-provider. This provider will allow you to define your NiFi node certificate DN as a user which you can then authorize as needed to make the rest-api call you want to make. Have you looked at using FlowFile Concurrency and Outbound Policy options available within the process group configuration to control the input and output of FlowFiles in and out of each process group? These settings would allow you to control the movement of FlowFiles from one PG to another and achieve I believe what you are trying to do with needing to programmatically start and stop Process groups via rest-api calls. Configuring a Process Group FlowFile Concurrency OutBound Policy Using rest-api calls first requires you to constantly check to make sure one PG is done processing all FlowFiles before you start the next. Not efficient design. You should try to design your dataflows so they are always running. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-25-2025
06:33 AM
@hegdemahendra In Apache NiFi 1.x versions the nifi.sh dump capability still exists, so you can still use that. ./nifi.sh dump /tmp/<dump filename> NOTE: dump is no longer an option in Apache NiFi 2.x versions But since NiFi is a Java application you can also take a java thread dump: jmap -dump:format=b,file=heap.hprof <nifi pid> Keep in mind that NiFi will have two process running (bootstrap process and main process). Make sure you are using the main NiFi pid and not the pid for the bootstrap process. Newer version of 1.x also include a diagnostics option. When in verbose, it will also output the thread dump in the diagnostics output. ./nifi.sh diagnostics --verbose /tmp/diag.txt Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-25-2025
06:09 AM
@Bern There is not enough information provided to make any suggestions yet. Apache NiFi 1.16 is still an almost 5 year old version. I'd encourage you to use the latest 1.x release available to make sure you have all the latest bug fixes and security fixes. The log line shared is incomplete and is also just an "INFO" level log message which is not going to tell us anything about and issue. I'd suggest looking at the logs on all the nodes for ERROR log messages. Re-check all yoru nifi.properties file configuration (hopefully you did NOT copy the config files from your 1.11 to 1.16 but rather used your 1.11 to set the appropriate configurations in the newer config files of 1.16. Beyond the above you'll need to inspect the a serous of Nifi thread dumps to see if the "main" thread is progressing (changing in each dump) or always has the same dump output. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-25-2025
05:54 AM
@Shrink What do you mean by "by storing flow file temporally to save RAM or backpressure"? FlowFiles held in NiFi connections will consume NiFi heap memory (unless queue has gotten very large resulting some of those queued FlowFiles being swapped to disk). But this behavior is no different if you use process groups or not. Process groups do allow you to configure: "Process Group FlowFile Concurrency" "Process Group Outbound Policy" I assume you are using the above to control the FlowFile going in and out of your process groups as those FlowFiles move from one process group to the next? Using these allows you to insure processing in one PG completes before the outbound FlowFiles are released to the next downstream process group. This also allows you to leave all your processor in a running state for more efficient /performant dataflow. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-25-2025
05:44 AM
1 Kudo
@Alf015 The "merge-param-context" cli.sh NiFi command does the following when merging one parameter context into another: Adds any parameters that exist in the exported context that don't exist in the
existing context. So your observations align with the documented behavior of this command. It will not modify value of any already existing parameter in the destination parameter context. It sounds like what you want to be using in the "set-param" command instead: Creates or updates a parameter in the given parameter context. Above will allow you to modify an existing parameter within the target parameter context. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-24-2025
01:13 PM
@hegdemahendra My initial guess would be a long running or hung thread on processor preventing it from transitioning from "stopping" to "stopped" state required. Including your full Apache NiFi version is aways helpful when posting a question. Allows someone helping to check easier if there happens to be any known bugs in that release that may be related to the issue. Analyzing NiFi thread dumps might help narrowing down what is specifically being waited on. NOTE: The Apache NiFi 1.x version are going end of life and Apache NIFi 2.x no longer supports variable registry. NiFi Parameters also available in the newer Apache NiFi 1.x versions are the replacement. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-24-2025
07:38 AM
@Alf015 The merge-param-context command will merge an exported parameter context's parameters into another existing parameter context. As simple exported parameter context with three parameters defined in it looks like this: {
"name" : "test-param",
"description" : "",
"parameters" : [ {
"parameter" : {
"name" : "test1",
"description" : "",
"sensitive" : false,
"value" : "test1",
"provided" : false,
"inherited" : false
}
}, {
"parameter" : {
"name" : "test2",
"description" : "",
"sensitive" : false,
"value" : "test2",
"provided" : false,
"inherited" : false
}
}, {
"parameter" : {
"name" : "test3",
"description" : "",
"sensitive" : false,
"value" : "test3",
"provided" : false,
"inherited" : false
}
} ],
"inheritedParameterContexts" : [ ]
} You can then use the merge-param-context command to merge the exported parameter context with another parameter context that already exists in the target NiFi: ./cli.sh nifi merge-param-context -i /tmp/test-param.json -p /opt/nifi-toolkit/conf/mytarget.properties -pcid b47a13ab-0195-1000-cc06-dc7779729310 --verbose "test-param.json" contains above shared json "mytarget.properties" contains the connection info for target NiFi. "b47a13ab-0195-1000-cc06-dc7779729310" is the id for the destination parameter context in which I am merging the input parameters There is a sample .properties file (../conf/cli.properties.example) in the toolkit conf directory. Contents of mine looks like this: baseUrl=https://nifihostname:8443
keystore=/opt/nifi/conf/keystore.p12
keystoreType=PKCS12
keystorePasswd=<password>
keyPasswd=<password>
truststore=/opt/nifi/conf/truststore.p12
truststoreType=PKCS12
truststorePasswd=<password>
proxiedEntity=<nifiadmin> You can get the values for above from your nifi.properties file of the target/destination NiFi. The proxiedEntity is my NiFi user identity that has permissions to edit the destination parameter context I am importing the new parameters into. NOTE: Your NiFi node must be authorized to /proxy user requests with Access Policies in destination NiFi. If you choose not to use a proxiedEntity, your NiFi node will need to be directly authorized to edit the target parameter context. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-24-2025
06:36 AM
@0tto Using child process groups is a matter of your own personal preference. Using child Process Groups allows you create a more manageable NiFi canvas by placing unique dataflows in different Process Groups. When it comes to one continuous dataflow, you may choose to put portions of it in to child process groups. For example, you might do this if portions of the dataflow can be reusable. You can right click on a process group and download a flow definition or you can choose to version control a process group to NiFi-Registry. These becomes snippets of your overall end-to-end dataflow. So let's your "transform" sub dataflow is reusable with just a few modifications, others could easily reuse it by importing from NIFi-Registry or deploying a shared flow definition. Typically users of NiFi will create a process group per unique end-to-end datflow or will create a unique process group per team to separate dataflows and control access per process group so team 1 can't mess with team 2's process group. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-23-2025
07:02 AM
@Shrink Once your certificate has expired, you'll need to generate a new certificate. Form your image, it appears you are using the NiFi auto-generated out-of-the-box self signed certificate? There are multiple options: (Recommended) The auto-generated certificate is intended to be used for product evaluation. For extended use and specially for production use, you should be using certificates signed by an internal company Certificate Authority (CA) or an external CA. You can manually create new self signed keystore and truststore as well. https://nifi.apache.org/nifi-docs/walkthroughs.html#manual-keystore To make life easier, I'd use the existing keystore.p12 and trustore.p12 filename instead of the nifi1.p12 and trust.p12 used in above documentation. I would also use the same password used already for the expired keystore.p12 and truststore.p12 files set in your nifi.properties file. That way if you are using these keystore and truststoe file in any NiFi dataflow controller services, you will not need to edit them. You could delete or rename the existing expired keystore.p12 and truststore.p12 files. Then edit the nifi.properies file to clear the keystore and truststore password values: nifi.security.keystorePasswd=
nifi.security.keyPasswd=
nifi.security.truststorePasswd= With the passwords cleared and the keystore.p12 file and truststore.p12 files removed/renamed, NiFi will generate a new keystore.p12 and truststore.p12 using new randomly generated passwords. Down side here is if you use the keystore and truststore anywher in your dataflow, you'll need to update the password. Or you can use the javak keytool command to change the passwords to the password used previously. If you do this, you'll need to restart NiFi afterwards for NiFi to start using the new passwords you update in the nifi.properties file. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
04-22-2025
05:34 AM
@ajaykumardev32 I would try to redesign your dataflow to avoid splitting the FlowFiles produced by tailFile processor. NiFi FlowFile content is immutable (can not be modified once created). Anytime the content of a FlowFile is modified, the new modified content is written to a new NiFi content claim. If the processor has an "Original" relationship, an entirely new FlowFile is created (both metadata and content). Those without "original" relationship that modify FlowFile content will simply update the existing FlowFile's metadata to point to new content claim. So your SplitText processor is producing a lot of new FlowFiles. You then have inefficient thread usage downstream where processor are now executing against many small FlowFiles. As far as Provenance repository goes, you can configure the max amount of storage it can use before purging older provenance events. Content and FlowFile repositories should not be on same disk since it is possible for content repository to fill the disk to 100%. You want to protect yoru FlowFile repository from filling to 100% by having it on a different physical or logical drive. Try utilizing the available "Record" based processors instead to avoid splitting FlowFiles and to do the record conversion/transform/modification. In your case take a look at these record processors to see if they can be used in your use case: UpdateRecord 1.28.0 ConvertRecord 1.28.0 JoltTransformRecord 1.28.0 ScriptedTransformRecord 1.28.0 You are already using a "record" based processor to write to your destination DB. Other strategies involve adjusting the "Max Timer Driven Thread" and processor "concurrent tasks" settings. You'll need to carefully monitor cpu load average as you make incremental adjustments. If you max out your cpu, there is no gain from adjusting higher anymore. Setting "Concurrent tasks" too high on any one processor can actually lead to worse performance overall in your dataflow. So small increments and monitor is the proper path to optimization in this area. Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more