Support Questions
Find answers, ask questions, and share your expertise

Getting Error during HDF Nifi installation using ambari

New Contributor

I am trying to install NiFi as HDF component Over ambari. OS version is SUSE 12 SP4. Ambari HDp version given below.

  1. ambari-
  2. HDF-
  3. hdf-ambari-mpack-

I have setup local repository for installation as no internet connectivity is there. Ambari install successfully But when we are trying to install HDF (Zookeeper, NiFi), then it is showing installation failed. Error Code is given below.


Traceback (most recent call last):

File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/", line 37, in


File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/", line 352, in execute


File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/", line 32, in hook


File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/", line 68, in install_repos


File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/", line 86, in create_repo_files

Repository(None, action="create")

File "/usr/lib/ambari-agent/lib/resource_management/core/", line 166, in __init__

File "/usr/lib/ambari-agent/lib/resource_management/core/", line 160, in run

self.run_action(resource, action)

File "/usr/lib/ambari-agent/lib/resource_management/core/", line 124, in run_action


File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/", line 69, in action_create


File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/", line 112, in update

checked_call(self.update_cmd, sudo=True)

File "/usr/lib/ambari-agent/lib/resource_management/core/", line 72, in inner

result = function(command, **kwargs)

File "/usr/lib/ambari-agent/lib/resource_management/core/", line 102, in checked_call

tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)

File "/usr/lib/ambari-agent/lib/resource_management/core/", line 150, in _call_wrapper

result = _call(command, **kwargs_copy)

File "/usr/lib/ambari-agent/lib/resource_management/core/", line 314, in _call

raise ExecutionFailed(err_msg, code, out, err)

resource_management.core.exceptions.ExecutionFailed: Execution of 'zypper clean --all' returned 1. Unexpected exception.

Url scheme is a required component

Please file a bug report about this.

See for instructions.


2019-06-06 07:41:34,723 - Stack Feature Version Info: Cluster Stack=3.3, Command Stack=None, Command Version=None -> 3.3

2019-06-06 07:41:34,726 - Group['hadoop'] {}

2019-06-06 07:41:34,727 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}

2019-06-06 07:41:34,768 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}

2019-06-06 07:41:34,769 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}

2019-06-06 07:41:34,770 - File['/var/lib/ambari-agent/tmp/'] {'content': StaticFile(''), 'mode': 0555}

2019-06-06 07:41:34,771 - Execute['/var/lib/ambari-agent/tmp/ ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa 0'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}

2019-06-06 07:41:34,775 - Skipping Execute['/var/lib/ambari-agent/tmp/ ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa 0'] due to not_if

2019-06-06 07:41:34,791 - Repository['HDF-3.3-repo-51'] {'base_url': '', 'action': ['prepare'], 'components': [u'HDF', 'main'], 'repo_template': '[{
	{repo_id}}\n{% if mirror_list %}mirrorlist={
	{mirror_list}}{% else %}baseurl={
	{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'ambari-hdf-51', 'mirror_list': None}

2019-06-06 07:41:34,799 - Repository['HDP-UTILS-'] {'base_url': '', 'action': ['prepare'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': '[{
	{repo_id}}\n{% if mirror_list %}mirrorlist={
	{mirror_list}}{% else %}baseurl={
	{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'ambari-hdf-51', 'mirror_list': None}

2019-06-06 07:41:34,801 - Repository[None] {'action': ['create']}

2019-06-06 07:41:34,802 - File['/tmp/tmpF8164w'] {'content': '[HDF-3.3-repo-51]\nname=HDF-3.3-repo-51\nbaseurl=\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-UTILS-]\nname=HDP-UTILS-\nbaseurl=\n\npath=/\nenabled=1\ngpgcheck=0'}

2019-06-06 07:41:34,802 - Writing File['/tmp/tmpF8164w'] because contents don't match

2019-06-06 07:41:34,803 - Rewriting /etc/zypp/repos.d/ambari-hdf-51.repo since it has changed.

2019-06-06 07:41:34,803 - File['/etc/zypp/repos.d/ambari-hdf-51.repo'] {'content': StaticFile('/tmp/tmpF8164w')}

2019-06-06 07:41:34,803 - Writing File['/etc/zypp/repos.d/ambari-hdf-51.repo'] because it doesn't exist

2019-06-06 07:41:34,804 - Flushing package manager cache since repo file content is about to change

2019-06-06 07:41:34,804 - checked_call[['zypper', 'clean', '--all']] {'sudo': True}

2019-06-06 07:41:34,827 - File['/etc/zypp/repos.d/ambari-hdf-51.repo'] {'action': ['delete']}

2019-06-06 07:41:34,827 - Deleting File['/etc/zypp/repos.d/ambari-hdf-51.repo']

2019-06-06 07:41:34,831 - Skipping stack-select on SMARTSENSE because it does not exist in the stack-select package structure.

Command failed after 1 tries



@Manoj Kumar

Confirm that you can browse to the newly created local repositories, where <web.server>, <>, <OS>, <version>, and <latest.version> represent the name, home directory, operating system type, version, and most recent release version, respectively:

Can you share your hdf.repo,ambari.repo?

Ambari Base URL







Be sure to record these Base URLs. You will need them when installing Ambari and the cluster.

Steps to install the HDF Management Pack on an HDP Cluster

 stop the ambari server  

# ambari-server stop
Back up your Ambari resources folder

# cp -r /var/lib/ambari-server/resources /var/lib/ambari-server/resources.backup

Release notes for the management pack
On the Ambari host

cd /tmp
wget -nv

Install the mpack

# ambari-server install-mpack --mpack=/tmp/hdf-ambari-mpack- --purge --verbose

Correct output

# ambari-server install-mpack --mpack=/tmp/hdf-ambari-mpack-
The following will be the output:
Using python /usr/bin/python
Installing management pack
Ambari Server 'install-mpack' completed successfully.
Restart Ambari server
# ambari-server start
On the Ambari UI

Navigate to add service and proceed with the desired options 🙂

Super Mentor

@Manoj Kumar

Basically we see the following failure:

resource_management.core.exceptions.ExecutionFailed: Execution of 'zypper clean --all' returned 1. Unexpected exception.
Url scheme is a required component

So can you please check if by any chance you see that baseurl is Empty in the following repo file on the failing host?

# grep 'baseurl'  /etc/zypp/repos.d/ambari-hdf-51.repo
# grep 'baseurl'  /etc/zypp/repos.d/ambari*

If you see that baseurl is showing incorrect then you should check the repository if that is showing correctly?

Ambari UI --> Stacks and Versions --> Versions (Tab) --> Manage Versions -->  check the URLs entered for "HDF-3.3" 

Also pleas verify if those are accessible? May be using some CURL command try to access those repo URLs from the ambari-server host as well as from the host where the installation is faling?

# curl -iv http://xxxxxxx/repodata/repomd.xml


May be you can check "/var/log/ambari-server/ambari-server.log" as well to see if it is complaining anything about the HDF repo registration?