Namenode installation issue

  • 0

Namenode installation issue

When you install hdp and during installation if something goes wrong with hdfs components(like namenode) then you may see following errors.

File “/usr/lib/python2.6/site-packages/resource_management/core/shell.py”, line 140, in _call_wrapper
result = _call(command, **kwargs_copy)
File “/usr/lib/python2.6/site-packages/resource_management/core/shell.py”, line 291, in _call
raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of ‘yes Y | hdfs –config /usr/hdp/current/hadoop-client/conf namenode -format’ returned 127.
/usr/hdp/current/hadoop-client/bin/hdfs: line 18: /usr/hdp/2.3.2.0-2950//hadoop-hdfs/bin/hdfs.distro: No such file or directory
yes: standard output: Broken pipe
yes: write error
stdout: /var/lib/ambari-agent/data/output-594.txt

ROOT CAUSE:
The packages were not installed correctly during cluster installation. There were many files that were missing under /usr/hdp/<HDP_VERSION>/hadoop-hdfs/bin.

RESOLUTION:

  • Run below command to check which package owns the missing file:
    • $ rpm -qf /usr/hdp/2.3.2.0-2950/hadoop-hdfs/bin/hdfs.distro
      hadoop_2_3_2_0_2950-hdfs-2.7.1.2.3.2.0-2950.el6.x86_64
  • Re-install the package by running below command.
    $ yum reinstall hadoop_2_3_2_0_2950-hdfs-2.7.1.2.3.2.0-2950.el6.x86_64

I hope it will help you to solve your namenode issue. Please feel free to give your feedback.