Support Questions

Find answers, ask questions, and share your expertise

[SOLVED] Ambari 2.4.0.1 fails to install HDP 2.5.0.0: yum repo and version mismatch

avatar
Contributor

I'm doing a fresh install of Ambari 2.4.0.1 and HDP 2.5.0.0. Ambari is working fine, I can go through the wizard and select the stack (2.5.0.0), do a manual registration of my hosts, assign the components (master/slave) and start the deployment.

The "Install, Test and Start" phase fails with the following stacktrace:

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py", line 174, in <module>
    DataNode().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py", line 49, in install
    self.install_packages(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 567, in install_packages
    retry_count=agent_stack_retry_count)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 54, in action_install
    self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 49, in install_package
    self.checked_call_with_retries(cmd, sudo=True, logoutput=self.get_logoutput())
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 83, in checked_call_with_retries
    return self._call_with_retries(cmd, is_checked=True, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 91, in _call_with_retries
    code, out = func(cmd, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 71, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 93, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 141, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 294, in _call
    raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install hadoop_2_4_2_0_258' returned 1. Error: Nothing to do

It fails installing hadoop_2_4_2_0_258 while I did select HDP 2.5.0.0 stack ?!?!

Looking at the yum repo set during the manual registration, it makes sense that version 2.4.2.0 is not found, since it's properly pointing to 2.5 repo:

$ cat /etc/yum.repos.d/HDP.repo
[HDP-2.5]
name=HDP-2.5
baseurl=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0


path=/
enabled=1

Why are the wrong version tried to be installed on the nodes?

Thanks

1 ACCEPTED SOLUTION

avatar
Contributor

Replying to my own question 🙂

For some reason, hdp-select was partially installe with a version 2.4.2.0.

Running a "yum upgrade hdp-select" on all the nodes did fix the problem of version mismatch.

View solution in original post

2 REPLIES 2

avatar
Contributor

Replying to my own question 🙂

For some reason, hdp-select was partially installe with a version 2.4.2.0.

Running a "yum upgrade hdp-select" on all the nodes did fix the problem of version mismatch.

avatar
Super Guru

Just ran into this one myself. Looks like Ambari parses the output of hdp-select to determine the full package name to install:

rpm -q --queryformat '%{version}-%{release}' hdp-select | sed -e 's/\.el[0-9]//g'