apache-nifiapache-zookeeperhortonworks-data-platform

NiFi processors cannot connect to Zookeeper


I am integrating Apache NiFi 1.9.2 (secure cluster) with HDP 3.1.4. HDP contains Zookeeper 3.4.6 with SASL auth (Kerberos). NiFi nodes successfully connect to this Zookeeper, sync flow and log heartbeats.

Meanwhile, NiFi processors using Zookeeper are not able to connect. GenerateTableFetch throws:

org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not open client transport for any of the Server URI's in ZooKeeper: Unable to read HiveServer2 uri from ZooKeeper)

ListHDFS fails attempting to write its state to ZooKeeper:

o.apache.nifi.processors.hadoop.ListHDFS ListHDFS  Failed to retrieve timestamp of last listing from the State Manager. Will not perform listing until this is accomplished.

But GetHDFS (which doesn't communicate with zk) works OK. Enable HiveConnector works without errors.

Thank you in before for any ideas and support.


Solution

  • First, I missed zk connect string in state-management.xml (thanks to @BenYaakobi for noticing).

    Second, Hive processors work with Hive3ConnectionPool from nifi-hive3-nar library. Library contains Hive3* processors, but Hive1* (e.g. SelectHiveQL, GenerateTableFetch) processors work with Hive3 connector as well.