Member since
09-04-2019
62
Posts
17
Kudos Received
11
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
735 | 10-30-2023 06:50 AM | |
9999 | 02-27-2023 09:25 AM | |
1766 | 07-07-2022 09:17 AM | |
1687 | 01-26-2022 06:25 AM | |
2417 | 01-25-2022 06:19 AM |
08-06-2020
07:27 PM
Hi @yogesh_shisode awesome that you are exploring NiFi. So just to be clear Apache Zookeeper can be considered an external service to help with state management / NiFi clustering With that said and to make things "flow" better, NiFi allows us to start an embedded zookeeper cluster. To me it seems that is what you are trying to connect to given the IP examples, so you are trying to use NiFi's embedded Zookeeper capability. So let's delve a little into zookeeper, we have zookeeper the service that can be single node or multi node. when in multi node we have a zookeeper ensemble and when we have that we need to maintain a quorum. This answer is very eloquently explained https://stackoverflow.com/questions/25174622/difference-between-ensemble-and-quorum-in-zookeeper And with that said please make sure you follow this guide: https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#embedded_zookeeper In it it discusses howe to configure the NiFi to start up as an embedded zookeeper service and the settings needed to accomplish this. For clarity port 2181 is the zookeeper listening port and depending on how many servers you configured to be your zookeeper servers based of this nifi.properties entry: nifi.state.management.embedded.zookeeper.start=false if it is set to true, then Nifi will start a zookeeper service too and will depend on this setting: nifi.state.management.embedded.zookeeper.properties=./conf/zookeeper.properties Which is all explained on the link I gave you https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#embedded_zookeeper AND once you decide who the member nodes of your zookeeper are then all the NiFi's regardless of wether they are zookeeper servers or not should have this property set: nifi.zookeeper.connect.string= ^^^ The same on all NiFi's And using your IP examples if you want 3 servers to be zookeeper servers, then I would expect this setting to be: nifi.zookeeper.connect.string=192.168.0.10:2181,192.168.0.20:2181,192.168.0.30:2181 And on those servers this setting to be: nifi.state.management.embedded.zookeeper.start=true And the additional configurations from the Apache NiFi admin guide linked above.
... View more
08-06-2020
12:05 PM
Just install the right java should be good enough. And if you get more than one JAVA just point JAVA HOME to a proper version for NiFi
... View more
08-06-2020
11:19 AM
@SAMSAL NiFi will only run on java 8 or 11 "NiFi requires Java 8 or 11. It is recommended that you have installed one of these Java versions prior to installing NiFi via Homebrew. Homebrew is aware NiFi depends on Java but not the specific supported versions, so it may prompt to install an incompatible JDK as part of its NiFi install." https://nifi.apache.org/docs/nifi-docs/html/getting-started.html#downloading-and-installing-nifi
... View more
08-06-2020
10:58 AM
@SAMSAL thanks for confirmation, what java version is the NiFi JVM using? You can find it multiple ways but maybe easiest is to look at: Global Configuration Menu ( top right ) > Cluster > Versions tab Or if single node maybe just finding the java version windows has, assuming not multiple.
... View more
08-06-2020
07:48 AM
Hi @SAMSAL , Could you provide a bit more info. What version of NiFi are you on? Can you provide the script? If you are using ExecuteScript make sure you are setting groovy as script engine and you do not need to install Groovy separately for ExecuteScript because it runs on the internal JVM using JSR-223 scripting. So if you are setting Module Directory just because you think you need to set that to point to groovy, try unsetting that. and can you run a simple script to test this out: import groovy.io.FileType
def flowFile = session.get(); session.transfer(flowFile, REL_SUCCESS)
... View more
07-20-2020
07:41 AM
To put Kerberos DEBUG logging for HDF managed Schema Registry ( SR ) clusters, do the following depending on your environment:
Navigate to Ambari schema registry > configs > advanced > registry-env template
Add the below line: export REGISTRY_OPTS="$REGISTRY_OPTS -Dsun.security.krb5.debug=true" Example:
Restart SR.
You will then be able to view Kerberos DEBUG messages under /var/log/registry (default).
... View more
Labels:
07-15-2020
12:18 PM
When NiFi is secured for TLS server authentication, at UI login time first it tries to use TLS certificates if loaded on the browser and then, it tries to use SPNEGO authentication, and finally, it falls back to your configured login provider.
If you KERBERISE the cluster via AMBARI and want to use login-providers like LDAP or KERBEROS, it automatically sets the following properties which enable SPNEGO authentication.
nifi.kerberos.spnego.keytab.location
nifi.kerberos.spnego.principal
Furthermore, SPNEGO properties through AMBARI are greyed out for:
COMMAND:
From your Amabari manager host, change the setting for NiFi, where the text in red is tailored to your unique environment:
nifi.kerberos.spnego.keytab.location to be blank:
./configs.py -a set -s http -l c2288-node1.squadron.support.hortonworks.com -t 8080 -n c2288 -u admin -p AdminPassword -c nifi-properties -k 'nifi.kerberos.spnego.keytab.location' -v ''
nifi.kerberos.spnego.principal to be blank
./configs.py -a set -s http -l c2288-node1.squadron.support.hortonworks.com -t 8080 -n c2288 -u admin -p AdminPassword -c nifi-properties -k 'nifi.kerberos.spnego.principal' -v ''
-a set
-s http or https
-l fqdn of ambari host
-t port number ambari is listening on
-n ambari cluster name ( you can get that from top right UI )
-u user that has edit privileges on ambari
-p the password for that user
-c the config type in this case nifi.properties
-k the key to change
-v the value to change
You can also do this for NiFi Registry with the following sample commands:
./configs.py -a set -s http -l c2288-node1.squadron.support.hortonworks.com -t 8080 -n c2288 -u admin -p AdminPassword -c nifi-registry-properties -k 'nifi.registry.kerberos.spnego.principal' -v ''
./configs.py -a set -s http -l c2288-node1.squadron.support.hortonworks.com -t 8080 -n c2288 -u admin -p AdminPassword -c nifi-registry-properties -k 'nifi.registry.kerberos.spnego.principal' -v ''
Restart NiFi and/or NiFi Registry and ensure that you clear your browser cache.
You should see the following on Ambari config sections of NiFi and/or NiFi registry:
... View more
05-06-2020
02:13 PM
I do not think that is the issue since on my working phoenix jar I have that too. Did you restart your nifi?
... View more
04-29-2020
06:42 AM
@DamD others, please follow this article. https://my.cloudera.com/knowledge/ERRORCannot-create-PoolableConnectionFactory-row-SYSTEMCATALOG?id=273198 In short the article tells you to add your: hbase-site.xml
core-site.xml
hdfs-site.xml to your phoenix-client.jar jar uf < phoenix client jar > hbase-site.xml core-site.xml and point to your phoenix-client.jar from NIFI's DBCPConnectionPool
... View more
04-17-2020
08:07 AM
2 Kudos
In this article, I will document how to use CFM 1.0.1.0 to interact with Apache Impala. This article still applies if using HDF / Apache NiFi
The latest official JDBC driver that will work when using NiFi is the JDBC driver 2.6.4 or below.
At the time of this writing, any driver above that causes class conflicts with the NiFi JVM and the driver's own use of log4j.
Pre-requisite
Downloading and extracting the JDBC driver:
The JDBC drivers can be found at Impala JDBC Connector 2.6.15 for Cloudera Enterprise.
Select 2.6.4 * or if in the future a version higher than 2.6.15 is available, use that.
Download and extract 2.6.4 and make note of where it extracts to.
Ensure that the user that runs the NiFi JVM ( nifi ) has permission to that path.
The jar file that you will use is called ImpalaJDBC41.jar.
Create Impala table and load dataset sample to HDFS:
Use this data set tips.csv and add it to your HDFS.
hdfs dfs -put data/tips.csv /user/hive/warehouse/tips/
Create your impala table:
impala-shell -i <impala_daemon_hostname>:21000 -q '
CREATE TABLE default.tips (
`total_bill` FLOAT,
`tip` FLOAT,
`sex` STRING,
`smoker` STRING,
`day` STRING,
`time` STRING,
`size` TINYINT)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ","
LOCATION "hdfs:///user/hive/warehouse/tips/";'
* These steps were taken from this article.
Configure the Nifi to interact with Impala:
On NiFi drag processor ExecuteSQL
Configure Database Connection Pooling Service on the ExecuteSQL processor
This is a pointer to the DBCPConnectionPool controller service that you will need to configure:
The driver documentation is really good at explaining the different settings you can pass. If you will interact with an Impala that is TLS secured and / or Kerberos there are options for that. In my example, I am interacting with a TLS and Kerberized Impala.
On the controller service section configure your DBCPConnectionPool and add the following:
Database Connection URL
My example:
jdbc:impala://YourImpalaHostFQDN:YourPort
Database Driver Class Name
com.cloudera.impala.jdbc41.Driver
Database Driver Location(s)
The following is the path to the JDBC driver (ImpalaJDBC41.jar) you downloaded earlier:
Back in the ExecuteSQL processor, add your SQL command. For this example, we are running a simple select query. By configuring SQL select query = select * from default.tips
That should be all you need.
If interacting with a TLS and / or Kerberos Impala, then you will need to look at the driver documentation for the options that apply to you. For reference, my connect string looked like below when connecting to a TLS and Kerberos Impala:
jdbc:impala://MyImpalaHost:21050;AuthMech=1;KrbHostFQDN=MyImpalaHostFQDN;KrbServiceName=impala;ssl=1;SSLTrustStore=/My/JKS/Trustore;SSLTrustStorePwd=YourJKSPassword
... View more