Skip to main content
bhopp
Gold ⭐️
Aug 22, 2018 1:50 AM UTC

Upgrade to HDF 3.2 fails when NiFi Registry is installed and Ranger is used

  • Oct 5, 2026 9:04 AM UTC
  • 3 replies
  • 4236 views
  • Translate All
Restarting NiFi nodes fails with an error message such as the one below:

<br>File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 278, in
Master().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 353, in execute
method(env)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 993, in restart
self.start(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 152, in start
nifi_cli.create_or_update_reg_client(params.nifi_registry_host, params.nifi_registry_url)
File "/u/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi_cli.py", line 175, in create_or_update_reg_client
existing_clients = list_reg_clients()
File "/u/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi_cli.py", line 144, in list_reg_clients
outputType="json"
File "/u/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi_cli.py", line 73, in nifi_cli
raise Fail("Failed to execute nifi cli.sh command")

Cause:

This occurs when the nifi.initial.admin.identity does not have permission to access the /controller API.

Workaround:

Create a local user in Ranger with the name of the initial admin idenity

Add a Ranger Policy for NiFi with Read/Write permissions for /controller

3 replies

cbernard
Silver ⭐️
Aug 29, 2018 2:24 PM UTC

This solution can help too as it can be caused by a port clash on 9088 when superset is running on the same host

Translate
Kyivstar
Gold ⭐️
Oct 3, 2018 9:34 PM UTC

Hi! Have same problem, but Ranger not installed

[root@serv12 ~]# grep -i Ranger /var/lib/ambari-agent/data/output-869.txt 2018-10-03 17:49:28,216 - Ranger admin not installed

91600-to-hdf-32.png

Translate
AMIRAL
Silver ⭐️⭐️
Oct 18, 2018 10:22 PM UTC

@Charles Bernard's suggestion solved it for me.

Translate