Reply
New Contributor
Posts: 1
Registered: ‎05-16-2017

Failed to format NameNode - /usr/lib/hadoop-hdfs/bin/hdfs: No such file or directory

I am using CM 5.7.1 to install CDH-5.7.1 new cluster using parcels.

 

Failed to format the namenode - Formatting the name directories of the current NameNode. If the name directories are not empty, this is expected to fail.

 

I am sure the directories are empty as it is fresh install. Attached below logs.

 

STDERR:

------------

 

Tue May 16 14:23:40 UTC 2017
+ source_parcel_environment
+ '[' '!' -z /usr/hadoop/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/meta/cdh_env.sh ']'
+ OLD_IFS='     
'
+ IFS=:
+ SCRIPT_ARRAY=($SCM_DEFINES_SCRIPTS)
+ DIRNAME_ARRAY=($PARCEL_DIRNAMES)
+ IFS='     
'
+ COUNT=1
++ seq 1 1
+ for i in '`seq 1 $COUNT`'
+ SCRIPT=/usr/hadoop/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/meta/cdh_env.sh
+ PARCEL_DIRNAME=CDH-5.7.1-1.cdh5.7.1.p0.11
+ . /usr/hadoop/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/meta/cdh_env.sh
/usr/lib64/cmf/service/common/cloudera-config.sh: line 175: /usr/hadoop/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/meta/cdh_env.sh: Permission denied
+ locate_cdh_java_home
+ '[' -z /usr/hadoop/cloudera/oraclejava/jdk1.8.0_74 ']'
+ verify_java_home
+ '[' -z /usr/hadoop/cloudera/oraclejava/jdk1.8.0_74 ']'
+ echo JAVA_HOME=/usr/hadoop/cloudera/oraclejava/jdk1.8.0_74
+ . /usr/lib64/cmf/service/common/cdh-default-hadoop
++ [[ -z 5 ]]
++ '[' 5 = 3 ']'
++ '[' 5 = -3 ']'
++ '[' 5 -ge 4 ']'
++ export HADOOP_HOME_WARN_SUPPRESS=true
++ HADOOP_HOME_WARN_SUPPRESS=true
++ export HADOOP_PREFIX=/usr/lib/hadoop
++ HADOOP_PREFIX=/usr/lib/hadoop
++ export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec
++ HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec
++ export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format
++ HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format
++ export HADOOP_COMMON_HOME=/usr/lib/hadoop
++ HADOOP_COMMON_HOME=/usr/lib/hadoop
++ export HADOOP_HDFS_HOME=/usr/lib/hadoop-hdfs
++ HADOOP_HDFS_HOME=/usr/lib/hadoop-hdfs
++ export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
++ HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
++ '[' 5 = 4 ']'
++ '[' 5 = 5 ']'
++ export HADOOP_YARN_HOME=/usr/lib/hadoop-yarn
++ HADOOP_YARN_HOME=/usr/lib/hadoop-yarn
++ replace_pid -Xms205520896 -Xmx205520896 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:OnOutOfMemoryError=/usr/lib64/cmf/service/common/killparent.sh
++ echo -Xms205520896 -Xmx205520896 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:OnOutOfMemoryError=/usr/lib64/cmf/service/common/killparent.sh
++ sed 's#{{PID}}#9793#g'
+ export 'HADOOP_NAMENODE_OPTS=-Xms205520896 -Xmx205520896 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:OnOutOfMemoryError=/usr/lib64/cmf/service/common/killparent.sh'
+ HADOOP_NAMENODE_OPTS='-Xms205520896 -Xmx205520896 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:OnOutOfMemoryError=/usr/lib64/cmf/service/common/killparent.sh'
++ replace_pid
++ echo
++ sed 's#{{PID}}#9793#g'
+ export HADOOP_DATANODE_OPTS=
+ HADOOP_DATANODE_OPTS=
++ replace_pid
++ echo
++ sed 's#{{PID}}#9793#g'
+ export HADOOP_SECONDARYNAMENODE_OPTS=
+ HADOOP_SECONDARYNAMENODE_OPTS=
++ replace_pid
++ echo
++ sed 's#{{PID}}#9793#g'
+ export HADOOP_NFS3_OPTS=
+ HADOOP_NFS3_OPTS=
++ replace_pid
++ echo
++ sed 's#{{PID}}#9793#g'
+ export HADOOP_JOURNALNODE_OPTS=
+ HADOOP_JOURNALNODE_OPTS=
+ '[' 5 -ge 4 ']'
+ HDFS_BIN=/usr/lib/hadoop-hdfs/bin/hdfs
+ export 'HADOOP_OPTS=-Djava.net.preferIPv4Stack=true '
+ HADOOP_OPTS='-Djava.net.preferIPv4Stack=true '
+ echo 'using /usr/hadoop/cloudera/oraclejava/jdk1.8.0_74 as JAVA_HOME'
+ echo 'using 5 as CDH_VERSION'
+ echo 'using /var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format as CONF_DIR'
+ echo 'using  as SECURE_USER'
+ echo 'using  as SECURE_GROUP'
+ set_hadoop_classpath
+ set_classpath_in_var HADOOP_CLASSPATH
+ '[' -z HADOOP_CLASSPATH ']'
+ [[ -n /usr/share/cmf ]]
++ find /usr/share/cmf/lib/plugins -maxdepth 1 -name '*.jar'
++ tr '\n' :
+ ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-5.7.1-shaded.jar:/usr/share/cmf/lib/plugins/tt-instrumentation-5.7.1.jar:
+ [[ -n navigator/cdh57 ]]
+ for DIR in '$CM_ADD_TO_CP_DIRS'
++ find /usr/share/cmf/lib/plugins/navigator/cdh57 -maxdepth 1 -name '*.jar'
++ tr '\n' :
+ PLUGIN=/usr/share/cmf/lib/plugins/navigator/cdh57/audit-plugin-cdh57-2.6.1-shaded.jar:
+ ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-5.7.1-shaded.jar:/usr/share/cmf/lib/plugins/tt-instrumentation-5.7.1.jar:/usr/share/cmf/lib/plugins/navigator/cdh57/audit-plugin-cdh57-2.6.1-shaded.jar:
+ eval 'OLD_VALUE=$HADOOP_CLASSPATH'
++ OLD_VALUE=
+ NEW_VALUE=/usr/share/cmf/lib/plugins/event-publish-5.7.1-shaded.jar:/usr/share/cmf/lib/plugins/tt-instrumentation-5.7.1.jar:/usr/share/cmf/lib/plugins/navigator/cdh57/audit-plugin-cdh57-2.6.1-shaded.jar:
+ export HADOOP_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-5.7.1-shaded.jar:/usr/share/cmf/lib/plugins/tt-instrumentation-5.7.1.jar:/usr/share/cmf/lib/plugins/navigator/cdh57/audit-plugin-cdh57-2.6.1-shaded.jar
+ HADOOP_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-5.7.1-shaded.jar:/usr/share/cmf/lib/plugins/tt-instrumentation-5.7.1.jar:/usr/share/cmf/lib/plugins/navigator/cdh57/audit-plugin-cdh57-2.6.1-shaded.jar
+ set -x
+ replace_conf_dir
+ find /var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format -type f '!' -path '/var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format/logs/*' '!' -name '*.log' '!' -name '*.keytab' '!' -name '*jceks' -exec perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format#g' '{}' ';'
Can't open /var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format/supervisor.conf: Permission denied.
+ make_scripts_executable
+ find /var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format -regex '.*\.\(py\|sh\)$' -exec chmod u+x '{}' ';'
+ '[' DATANODE_MAX_LOCKED_MEMORY '!=' '' ']'
+ ulimit -l
+ export HADOOP_IDENT_STRING=hdfs
+ HADOOP_IDENT_STRING=hdfs
+ '[' -n '' ']'
+ acquire_kerberos_tgt hdfs.keytab
+ '[' -z hdfs.keytab ']'
+ '[' -n '' ']'
+ '[' validate-writable-empty-dirs = format-namenode ']'
+ '[' file-operation = format-namenode ']'
+ '[' bootstrap = format-namenode ']'
+ '[' failover = format-namenode ']'
+ '[' transition-to-active = format-namenode ']'
+ '[' initializeSharedEdits = format-namenode ']'
+ '[' initialize-znode = format-namenode ']'
+ '[' format-namenode = format-namenode ']'
+ '[' -z /hadoop/data/dfs/nn ']'
+ for dfsdir in '$DFS_STORAGE_DIRS'
+ '[' -e /hadoop/data/dfs/nn ']'
+ CLUSTER_ARGS=
+ '[' 2 -eq 2 ']'
+ CLUSTER_ARGS='-clusterId cluster5'
+ '[' 3 = 5 ']'
+ '[' -3 = 5 ']'
+ exec /usr/lib/hadoop-hdfs/bin/hdfs --config /var/run/cloudera-scm-agent/process/21-hdfs-NAMENODE-format namenode -format -clusterId cluster5 -nonInteractive
/usr/lib64/cmf/service/hdfs/hdfs.sh: line 268: /usr/lib/hadoop-hdfs/bin/hdfs: No such file or directory
/usr/lib64/cmf/service/hdfs/hdfs.sh: line 268: exec: /usr/lib/hadoop-hdfs/bin/hdfs: cannot execute: No such file or directory

 

Need help on this to proceed my install.

 

Announcements