Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Datanode installation fails with import error

Datanode installation fails with import error

New Contributor

I have a 5 node physical cluster with RH 7.4 installed. All five are configured as data nodes. One of them is ambari server. On that machine, ambari server, ambari agent, name node and data node services are installed. But data node installation via Ambari is failing. This is for HDP The same kind of configuration works fine on my VM cluster with 4 nodes and CentOS 7.4 on each node. Note that Datanode installation on other nodes of the cluster succeeded. Only this one node has a problem.

The site-packages seem to be fine:


[root@hdp11061 site-packages]# pwd /usr/lib/python2.6/site-packages

[root@hdp11061 site-packages]#

[root@hdp11061 site-packages]# ls -la

total 20

drwxr-xr-x 5 root root 169 Oct 19 01:36 .

drwxr-xr-x 3 root root 27 Oct 18 09:34 ..

drwxr-xr-x 4 root root 8192 Oct 19 01:36 ambari_agent

lrwxrwxrwx 1 root root 41 Oct 18 23:42 ambari_commons -> /usr/lib/ambari-server/lib/ambari_commons

lrwxrwxrwx 1 root root 40 Oct 18 23:42 ambari_jinja2 -> /usr/lib/ambari-server/lib/ambari_jinja2

drwxr-xr-x 2 root root 4096 Oct 18 23:48 ambari_server

lrwxrwxrwx 1 root root 44 Oct 18 23:42 ambari_simplejson -> /usr/lib/ambari-server/lib/ambari_simplejson

lrwxrwxrwx 1 root root 46 Oct 18 23:48 resource_management -> /usr/lib/ambari-server/lib/resource_management

drwxr-xr-x 3 1005 hadoop 20 Oct 18 23:13 resource_monitoring

[root@hdp11061 site-packages]# ls resource_management/core/ environment.pyc exceptions.pyo global_lock.pyo resources source.pyc sudo.pyo base.pyc environment.pyo files logger.pyc signal_utils.pyc source.pyo utils.pyc base.pyo __init__.pyc logger.pyo shell.pyc signal_utils.pyo system.pyc utils.pyo exceptions.pyc global_lock.pyc __init__.pyo providers shell.pyo sudo.pyc system.pyo


As we can see above, the file exists. So not sure why the import is failing. And I haven't changed the code in at all.

This is the error that Ambari shows:

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HDFS/", line 24, in <module>
    from resource_management import Script, Fail, shell, Logger
ImportError: cannot import name shell