Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ambari setup stuck at step 3

avatar

Hi,

While installing Ambari 2.6 to setup a 2 node HDP cluster i was stuck at step 3 saying "Please wait while the hosts are being checked for potential problems..". i have checked the ambari-server.log and it says "Unable to lookup the cluster by ID; assuming that there is no cluster and therefore no configs for this execution command: Cluster not found, clusterName=clusterID=-1"

Here is the excerpt from the ambari-server.log

13 Nov 2017 13:09:24,422 WARN [ambari-action-scheduler] ExecutionCommandWrapper:225 - Unable to lookup the cluster by ID; assuming that there is no cluster and therefore no configs for this execution command: Cluster not found, clusterName=clusterID=-1 13 Nov 2017 13:09:25,427 WARN [ambari-action-scheduler] ExecutionCommandWrapper:225 - Unable to lookup the cluster by ID; assuming that there is no cluster and therefore no configs for this execution command: Cluster not found, clusterName=clusterID=-1 13 Nov 2017 13:11:11,433 INFO [pool-18-thread-1] MetricsServiceImpl:65 - Attempting to initialize metrics sink 13 Nov 2017 13:11:11,434 INFO [pool-18-thread-1] MetricsServiceImpl:81 - ********* Configuring Metric Sink ********** 13 Nov 2017 13:11:11,434 INFO [pool-18-thread-1] AmbariMetricSinkImpl:95 - No clusters configured. 13 Nov 2017 13:16:11,434 INFO [pool-18-thread-1] MetricsServiceImpl:65 - Attempting to initialize metrics sink 13 Nov 2017 13:16:11,435 INFO [pool-18-thread-1] MetricsServiceImpl:81 - ********* Configuring Metric Sink ********** 13 Nov 2017 13:16:11,435 INFO [pool-18-thread-1] AmbariMetricSinkImpl:95 - No clusters configured.

pls help

i have followed the steps in hortonworks youtube channel on setting up the cluster but dont know what i am missing.

Thanks

Rahul

34 REPLIES 34

avatar
New Contributor

Hi,
I had the same problem as you and I tried to change system locale of /etc/locale.conf from ja_JP.UTF-8 into en_US.UTF-8 and then it works.

avatar
New Contributor

Hi, Rahul Narayanan

Have you resolved your problem?

I met the same appearance with you when I was installing Ambari 2.6 on Centos7.1;

my OS information is listing below :

  • CentOS Linux release 7.1.1503 (Core)
  • Linux edgeserver 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

when step 3 was running, I got an error on ambari agent node in file /var/lib/ambari-agent/data/output-107.txt,

2017-12-12 15:05:42,610 - Host checks started. 2017-12-12 15:05:42,610 - Check execute list: last_agent_env_check,installed_packages,existing_repos,transparentHugePage
2017-12-12 15:05:42,610 - Last Agent Env check started. 2017-12-12 15:05:42,699 - Last Agent Env check completed successfully. 2017-12-12 15:05:42,699 - Installed packages and existing repos checks started. 2017-12-12 15:05:45,881 - There was an unknown error while checking installed packages and existing repositories: list index out of range
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 170, in actionexecute
    installed_packages, repos = self.execute_existing_repos_and_installed_packages_check(config)
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 234, in execute_existing_repos_and_installed_packages_check
    availablePackages = self.pkg_provider.all_available_packages()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 210, in all_available_packages
    return self._get_available_packages(None)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 146, in _get_available_packages
    return self._lookup_packages(cmd, 'Available Packages')
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 191, in _lookup_packages
    if items[i + 2].find('@') == 0:
IndexError: list index out of range 2017-12-12 15:05:45,882 - Transparent huge page check started.
2017-12-12 15:05:45,884 - Transparent huge page check completed.
2017-12-12 15:05:45,885 - Host checks completed.

I fixed this issue by modifying code,

'/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py';

original code :

def _lookup_packages(self, command, skip_till):
    """
    :type command list[str]
    :type skip_till str|None
    """
    packages = []
    result = self._call_with_timeout(command)
    if result and 0 == result['retCode']:
      lines = result['out'].split('\n')
      lines = [line.strip() for line in lines]
      items = []
      if skip_till:
        skip_index = 3
        for index in range(len(lines)):
          if skip_till in lines[index]:
            skip_index = index + 1
            break
      else:
        skip_index = 0
      for line in lines[skip_index:]:
        items = items + line.strip(' \t\n\r').split()
      for i in range(0, len(items), 3):
        if '.' in items[i]:
          items[i] = items[i][:items[i].rindex('.')]
        if items[i + 2].find('@') == 0:
          items[i + 2] = items[i + 2][1:]
        packages.append(items[i:i + 3])
    return packages

modified code :

def _lookup_packages(self, command, skip_till):
    """
    :type command list[str]
    :type skip_till str|None
    """
    packages = []
    result = self._call_with_timeout(command)
    if result and 0 == result['retCode']:
      lines = result['out'].split('\n')
      lines = [line.strip() for line in lines]
      items = []
      if skip_till:
        skip_index = 3
        for index in range(len(lines)):
          if skip_till in lines[index]:
            skip_index = index + 1
            break
      else:
        skip_index = 0
      for line in lines[skip_index:]:
        items = items + line.strip(' \t\n\r').split()
      for i in range(0, len(items), 3):
        if '.' in items[i]:
          items[i] = items[i][:items[i].rindex('.')]
        if i + 2 < len(items) :
          if items[i + 2].find('@') == 0:
            items[i + 2] = items[i + 2][1:]
          packages.append(items[i:i + 3])
    return packages

Wish this will be helpful for you!

Thanks!

avatar
New Contributor

Thank you. your fix resolved my problem. Is this an issue with Ambari 2.6?

avatar
New Contributor

huan zhou answer worked also on CentOS Linux release 7.5.1804 (Core) (3.10.0-862.3.2.el7.x86_64) with Ambari 2.6.0. It seams that the issue is on yumrpm.py

avatar
Rising Star

Hi,

Though this post is old, for the same of future, mentioning my process to solve this issue:

ambari-server reset

remove all the users: Yes

mysql -u root -pwelcome1

show databases;

drop ambari database;

show databases;

quit;

mysql -u ambari -pwelcome1

CREATE DATABASE ambari;

USE ambari;

SOURCE /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;

show tables;

All the 103 tables will be created.

commit;

quit;

Start Ambari Console and start creating new cluster

At Step 3 following and move ahead Run following script on all nodes:

python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent --skip=users

python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent

python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py

Uninstall all the unrequired packages

yum remove <package name>

Move ahead