Member since
07-30-2019
3387
Posts
1617
Kudos Received
999
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 123 | 11-05-2025 11:01 AM | |
| 372 | 10-20-2025 06:29 AM | |
| 512 | 10-10-2025 08:03 AM | |
| 355 | 10-08-2025 10:52 AM | |
| 393 | 10-08-2025 10:36 AM |
02-13-2025
06:18 AM
@hus The PutFile processor has a conflict resolution option of "replace". When used and a file of the same filename already exists in target directory, it will be replaced with the file being written by putFile processor. Please help our community thrive. 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
02-13-2025
06:14 AM
@mridul_tripathi The best way to check if two files have the exact same content is to generate a hash of the content and then compare that those two hashes to see if they are the same. While comparing hash values allows you to detect if the content is the same between NiFi FlowFiles, it sounds like you want to determine what is different and not just that they are different? NiFi does not have a processor that is designed to do this function. So what is the full use case here? SFTP1 is source of truth always expected to have correct content? SFTP2 is the backup or expected to have content that matches SFTP1? Example use case: You could pull a file from SFTP2 (File to be verified), create a FlowFile attribute containing the hash of this file (Hash-SFTP2), then zero out the content (Modify bytes), then pass this FlowFile to a FetchSFTP (used to fetch file of same filename from SFTP 1), create another FlowFile attribute (hash-sftp1), Now you can use a RouteOnAttribute that compares the two hash attributes to see if they are the equal. If false, route the FlowFile to PutSFTP to overwrite the file on SFTP2 withe FlowFiles current content from SFTP1 so that both SFTP server now have matching content for this filename. Now if your use case is to somehow output a FlowFile containing all the difference in the content, that is more challenging and would likely require something custom (custom processor or some custom script) Please help our community thrive. 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
02-12-2025
10:34 AM
@fy-test The NiFi node that disconnects due to a flow mismatch should inherit the cluster flow when it attempts to rejoin the cluster. The only time this is not possible is if the cluster flow includes change that would result in dataloss. Example: Cluster flow has a connection removed that on the connecting node still has queued FlowFiles. NiFi has not feature to force removal/archive of a flow.json.gz on a disconnected node. You could file an Apache NiFi improvement jira here: https://issues.apache.org/jira/projects/NIFI But first step is to identify why your node is not able to inherit cluster flow and rejoin the cluster. What is the exception logged when it attempts to rejoin the cluster? Please help our community thrive. 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
02-12-2025
10:24 AM
@Darryl The ListenUDP processor will listen on a specific port and can be configured to listen on a specific network interface on the NiFi host. The question is what network interface on the NiFi host is assigned and address associated with your multicast 224.1.1.1 ip address? You can't bind any NiFi processor to a specific IP address. NiFi supports multi-node clusters where every node runs the exact same dataflows. Lets assume your multicast group is sending datagrams to port 10000 on the eth3 network interface on your NiFi host, then you would configure the listenUDP to create a listener using port 10000 for eth3. The Site to Site properties from the nifi.properties have absolutely nothing to do with any processor components you add to the NiFi UI. Site-to-Site (S2S) NiFi protocol is used for the transfer of NiFi FlowFiles between NiFi nodes. This S2S protocol is utilized by Remote Process Groups and Load Balanced connections capability only. You'll want to unset 10000 in the S2S settings since you want your listenUDP processor to bind to that port number. You'll also want to unset 224.1.1.1 as the S2S input host. S2S can't bind to host that does not resolve to one of the NiFi network interfaces. S2S reference documentation: Site-to-Site Site to Site Properties Please help our community grow and 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
02-11-2025
09:34 AM
1 Kudo
@nifi-srinikr The exception you shared is complaining about a null value for the "flowConfigurationFile": Caused by: java.lang.NullPointerException: Cannot invoke "java.io.File.exists()" because "flowConfigurationFile" is null On NiFi startup NiFi will check if the flow configuration file that NiFi is configured to use exists. If it does not, NiFi will create it. In your case it appears this property is null and this the if exists check is failing. The configuration file location and filename is specified by this property in the nifi.properties file: nifi.flow.configuration.file=<path to>/flow.xml.gz (Apache NiFi 1.x releases) or nifi.flow.configuration.file=<path to>/flow.json.gz (Apache NiFi 2.x releases) What version of Apache NiFi are you using? Please help our community grow and trhive. 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
02-07-2025
12:09 PM
@Darryl You will certainly have issues using localhost even outside docker with a multi-node NiFi cluster since only the NiFi node installed in the same server as Keycloak would have any chance of connecting with Keycloak. Understand that a NiFi cluster can bae accessed form any node in the NiFi cluster. So first thing i would have suggested is using the hostname of the actual server that is hosting Keycloak rather then localhost. I am not familiar with Keycloak myself and the article you reference (while i know the author) is very old. A lot has likely evolved/changes with regards to security since it was written. Glad to hear you had some success even if it was outside of Docker and thank you with sharing what you learned with the community. Matt
... View more
02-07-2025
05:48 AM
@Darryl Please start a new community question around your new keycloak integration issues with NiFi. Thank you, Matt
... View more
02-06-2025
10:06 AM
hello @Darryl the ldap exception shared indicates your ldap does not support anonymous access and expects authentication: Caused by: javax.naming.NoPermissionException: [LDAP: error code 50 - No user currently bound]
2025-02-05 09:20:33 at java.naming/com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3268) using the "SIMPLE" strategy would use the manager DN and Manager password to connect to the ldap. "LDAPS" strategy would still require manager DN and Manager password, but would also require TLS properties configured (truststore only if one one may TLS is required by your ldap or both keystore and truststore if mutual TLS exchange is required by your ldap). LDAPS strategy requires using the ldaps://<url>:<ldaps port>. "START_TLS" is rarely used, but has same requirements as LDAPS strategy; however, connection is initially made insecure and later redirected to secure connection url. https://nifi.apache.org/nifi-docs/administration-guide.html#ldapusergroupprovider Also: Your user search base configuration is till not valid, but that is not related to your ldap connection exception. Please help our community grow and thrive. 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
02-06-2025
09:48 AM
1 Kudo
@jfs912 You should not be configuring your NiFi with larger then necessary heap. Doing so just leads to very long stop-the-world garbage collection events. The simple flow you have described would use very little heap memory. So you have a 5 node cluster and each nodes has files in some local directory that each node is pulling from? Is that local directory a mounted directory that is mounted to all nodes or each nodes has its own set of files in the local directly from which getFile is pulling from? Are you seeing backpressure being applied on any of the connections between your processors? When backpressure is being applied to the upstream processor, NiFi will not schedule that upstream processor until that backpressure is removed. If you can tolerate some latency in your dataflow, you can get better throughput performance with some processors by increasing the Run Duration as well. Dataflow design best practices and designs can also improve performance and better load distribution across all the nodes in your cluster. You want to minimize as much as possible one node doing bulk of the work load. Adjusting concurrent tasks has multiple elements to it. What is the current CPU load average on each of yoru 5 servers? First need to know if there is capacity to run more parallel threads. How large is the configured timer driven thread pool in NiFi? It is from this configured thread pool that all concurrent tasks used by processor components comes from. If this pool is small, adding more concurrent tasks to processors will improve nothing. Ability to increase the size of this thread pool is dependent on node's cpu load average. Thread pool is also applied per node. So when set to 10 that is 10 threads per each node in your 5 node cluster. If cpu load average is not high and you increase the size of the Timer Driven Thread pool, you'll want to make small incremental changes to the concurrent tasks on processor and monitor impact on CPU load average. Please help our community grow and thrive. 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
02-06-2025
07:00 AM
@BK84 The exception is caused by: Caused by: java.lang.IllegalStateException: The specified class 'org.apache.nifi.controller.state.providers.raft.RaftStateProvider' is not known to this nifi. Your NiFi knows nothing about this class meanung the nifi lib directory does not contain any nar that includes this class: org.apache.nifi.controller.state.providers.raft.RaftStateProvider I also see nothing in Apache NiFi Jira nor in the NiFi 2 documentation mentioning this class or any type of raft state provider. Looking at the properties configured with this provider class, they match the zookeeper properties. So I suspect you should be using this class instead in your stet provider: org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider Please help our community grow and thrive. 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