Member since
07-30-2019
3472
Posts
1642
Kudos Received
1020
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 242 | 06-03-2026 06:06 PM | |
| 520 | 05-06-2026 09:16 AM | |
| 998 | 05-04-2026 05:20 AM | |
| 574 | 05-01-2026 10:15 AM | |
| 691 | 03-23-2026 05:44 AM |
02-12-2020
01:15 PM
@chhaya_vishwaka It may be beneficially to other users since this thread/topic was so long, if you accept each response that helped directly with getting to your final working cluster. I am happy to hear that you are up and running. Now you get to explore the very granular authorizations/access policies NiFi provides within your secured cluster. Matt
... View more
02-12-2020
01:11 PM
@thuylevn The specific processors you mention were never part of any distribution of Apache NiFi. 1. JSONToAttributes: Typically when extracting json elements in to FlowFile Attrinutes you would use the EvaluateJsonPath processor. There is an "AttributesToJson" processor, is that maybe what you mean? 2. ConvertJSONToAvro NiFi ships with a ConvertAvroToJson processor, is that perhaps what you mean? If you trying to convert from one content format to another, the preferred processor to use would be "convertRecord". In this processor's configuration you would select a Record Reader which reads the current format of the inbound FlowFile's content (JsonPathReader or JsonTreeReader in this case) and you then select a Record Writer (AvroRecordSetWriter in this case) which writes the content for the outbound FlowFile. If the processor types you mentioned did exist for you, then they were added via a custom nar to your previous NiFi installations. Hope this helps, Matt
... View more
02-11-2020
10:34 AM
@JatinSab Troubleshooting this here with limited information is going to prove difficult. Does the downstream processor of the connection with the "stuck" FlowFiles have... 1. Configured for all nodes or primary node Execution? If primary node only, are the queued FlowFiles on the primary node? 2. Does processor show it has active threads? (small number in upper right corner of processor) . If so, get some thread dumps from your NiFi and inspect if the thread is progressing or hung. 3. Is back pressure being applied on any of the outbound connections? 4. Is processor getting threads to do work? What is CPU load on your system and configured "Max Timer Driven Thread Count?" It may be set to low causing a thread starved situation for your dataflow. Additionally, if you try to perform a "list queue" on the connection of issue, what result do you get? If you have a support contract with Cloudera, you can open a support case and they can help you to a solution. Thanks, Matt
... View more
02-11-2020
08:27 AM
@venu413 Are these the same FlowFiles that were stuck prior to the upgrade? If you clean out your connections, do you see the issue occur later?
... View more
02-11-2020
08:20 AM
@JatinSab Apache NiFi 1.11.1 specifically has a fix https://jira.apache.org/jira/browse/NIFI-7059 which introduced a bug with load-balanced connections. This bug is addressed in 1.11.2 and is covered in jira https://jira.apache.org/jira/browse/NIFI-7117. Thanks, Matt
... View more
02-11-2020
08:04 AM
1 Kudo
@chhaya_vishwaka Please stop your NiFi nodes and delete the local NiFi "state" directory on each of them. Then restart your NiFi nodes to see if this helps. Removing the local state will clear out the retained node information which may still contain info about your nodes before they were secured. Thanks, Matt
... View more
02-10-2020
05:44 AM
1 Kudo
@chhaya_vishwaka You can see from the nifi-user.log that the DN passed to NiFi was: CN=nifi-host1, OU=nifi, O=nifi, L=SG, ST=SG, C=SG Where did cert with above DN come from? Is a cert with this DN loaded on your browser? The NiFi user log goes on to tell you that the above authenticated string was not authorized for "view the user interface": [CN=nifi-host1, OU=nifi, O=nifi, L=SG, ST=SG, C=SG], groups[] does not have permission to access the requested resource. Unable to view the user interface. Returning Forbidden response. This certificate does not have "Admin" anywhere in its DN. Did you maybe load your NiFi node certificates in to your browser also? When your browser prompted you to select a certificate to use, did you maybe select the wrong one? I also see from above that the entire DN is being passed for authorization which tells me you do not have an identity mapping pattern setup in your nifi.properties file to trim a portion of the DN (CN value most commonly) from the full DN. If you used "Admin" as your initial admin identity, then the resulting string after authentication and post any configured identity mapping is applied must match exactly to "Admin". https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#identity-mapping-properties As an example, the following identity mapping pattern properties would result in the above DN being trimmed so that only "nifi-host1" would be passed to the authorizer. nifi.security.identity.mapping.pattern.dn=^CN=(.*?), OU=nifi, O=nifi, L=SG, ST=SG, C=SG$
nifi.security.identity.mapping.value.dn=$1
nifi.security.identity.mapping.transform.dn=NONE Note: The transform property is used to normalize the resulting mapped value to all UPPER or all LOWER case if needed. NONE results in no transform. Also keep in mind that mapping patterns will also be applied to your server certificates DNs. So if your server certificate DN matches the pattern regex also, only the server certs CN value will be passed to authorizer. So if you use identity patterns, you are likely going to need to update your "Initial User Identity <num>" and "Node Identity <num>" in your authorizers.xml file to use the CN value instead of the full DN for each of your nodes. Hope this helps, Matt
... View more
02-07-2020
08:23 AM
@nishank_paras Let's assume your input FlowFile content looks like this: Date, IP, Description
01-30-2020, 10.0.0.1, server1
01-30-2020, 10.0.1.2, server2
01-30-2020, 10.0.3.4, server3
01-30-2020, 10.0.4.6, server4
01-30-2020, 10.0.10.2, server5 You would configure your ReplaceText processor as follows: The Search Value contains a java regular expression which will match on your entire line and uses one capture group. The Replacement Value says to replace everything matched by the Search Value Regex with only the value from capture group 1. We then configure ReplaceText to evaluate that Regex against each line. The resulting FlowFile output to the success relationship will have content that looks like this: IP
10.0.0.1
10.0.1.2
10.0.3.4
10.0.4.6
10.0.10.2 Hope this helps, Matt
... View more
02-07-2020
07:50 AM
1 Kudo
@chhaya_vishwaka "Insufficient Permissions" indicates the issue is with user/client authorization and not authentication anymore. Note: you may or may not see the "log out" option. You should tail the nifi-user.log and then try accessing the NiFi UI to get the full log output for the user action that was attempted. For example: 2020-02-07 15:32:51,925 INFO [NiFi Web Server-26362] o.a.n.w.a.c.AccessDeniedExceptionMapper identity[nifiuser1], groups[nifiDFMeast, users] does not have permission to access the requested resource. Unable to view the user interface. Returning Forbidden response.
2020-02-07 15:32:51,927 DEBUG [NiFi Web Server-26362] o.a.n.w.a.c.AccessDeniedExceptionMapper
org.apache.nifi.authorization.AccessDeniedException: Unable to view the user interface. If you are not ever seeing the canvas, your authenticated user does not have the "view the user interface" (/flow policy) granted to your authenticated user identity string. As you can see from above nifi-user.log output, we can confirm this. What we also learn from this log output is that the user who successfully authenticated is being identified with user string "nifiuser1" and is a member of two groups "nifiDFMeast" and "users". NiFi authorization is handled by which ever authorizer you have configured in your NiFi authorixzers.xml and referenced my the following property in your nifi.properties file: nifi.security.user.authorizer=managed-authorizer By default a secured NiFi will use a file based authorizer which relies on a "users.xml" (associates locally created known users to locally created known groups) and an "authorizations.xml" (associates the UUIDs assigned to the users and groups to various authorization policies. So using example above, my users.xml file would need to contain user "nifiuser1" and groups "nifiDFMeast" and "users" (all case sensitive). Each of those strings would be assigned a UUID. In order for my user to see the NiFi canvas, one of those assigned UUIDs would need to be assigned to the /flow policy in the authorizations.xml file. NiFi on first startup only creates the users.xml and authorizations.xml file based on initial admin identity and node Identity values configured in the authorizers.xml file. If you have already started NiFi secure and later edit these identities, those changes will not be reflected in either file. Remove these two files an restart NiFi so they are created new again with your changes (this should only be done during initial setup of a secure NiFi). Once your initial admin user is able to access the UI, all additional users and authorizations policies would be added via the NiFi UI. Hope this helps, Matt
... View more
02-06-2020
07:28 AM
@nishank_paras Without an example input and desired output file, It is difficult to provide an exact solution. However, you may want to consider using the ReplaceText processor in NiFi. This processor can be configured with a java regular expression that uses java capture groups to parse your csv file line by line and then use the capture group to replace that lien with only the desired column value. Just make sure you configure the processor to use "Line-by-Line" instead of the default "Entire text". Hope this helps you get to a solution that works for you, Matt
... View more