Datanode process not running in Hadoop

前端 未结 30 2283
慢半拍i
慢半拍i 2020-12-04 09:02

I set up and configured a multi-node Hadoop cluster using this tutorial.

When I type in the start-all.sh command, it shows all the processes initializing properly as

相关标签:
30条回答
  • 2020-12-04 09:12

    This is for newer version of Hadoop (I am running 2.4.0)

    • In this case stop the cluster sbin/stop-all.sh
    • Then go to /etc/hadoop for config files.

    In the file: hdfs-site.xml Look out for directory paths corresponding to dfs.namenode.name.dir dfs.namenode.data.dir

    • Delete both the directories recursively (rm -r).
    • Now format the namenode via bin/hadoop namenode -format
    • And finally sbin/start-all.sh

    Hope this helps.

    0 讨论(0)
  • 2020-12-04 09:12
    1. I configured hadoop.tmp.dir in conf/core-site.xml

    2. I configured dfs.data.dir in conf/hdfs-site.xml

    3. I configured dfs.name.dir in conf/hdfs-site.xml

    4. Deleted everything under "/tmp/hadoop-/" directory

    5. Changed file permissions from 777 to 755 for directory listed under dfs.data.dir

      And the data node started working.

    0 讨论(0)
  • 2020-12-04 09:14

    Follow these steps and your datanode will start again.

    1. Stop dfs.
    2. Open hdfs-site.xml
    3. Remove the data.dir and name.dir properties from hdfs-site.xml and -format namenode again.
    4. Then remove the hadoopdata directory and add the data.dir and name.dir in hdfs-site.xml and again format namenode.
    5. Then start dfs again.
    0 讨论(0)
  • 2020-12-04 09:14

    Instead of deleting everything under the "hadoop tmp dir", you can set another one. For example, if your core-site.xml has this property:

    <property>
      <name>hadoop.tmp.dir</name>
      <value>/home/hduser/data/tmp</value>
    </property>
    

    You can change this to:

    <property>
      <name>hadoop.tmp.dir</name>
      <value>/home/hduser/data/tmp2</value>
    </property>
    

    and then scp core-site.xml to each node, and then "hadoop namenode -format", and then restart hadoop.

    0 讨论(0)
  • 2020-12-04 09:14

    Error in datanode.log file

    $ more /usr/local/hadoop/logs/hadoop-hduser-datanode-ubuntu.log
    

    Shows:

    java.io.IOException: Incompatible clusterIDs in /usr/local/hadoop_tmp/hdfs/datanode: namenode clusterID = CID-e4c3fed0-c2ce-4d8b-8bf3-c6388689eb82; datanode clusterID = CID-2fcfefc7-c931-4cda-8f89-1a67346a9b7c
    

    Solution: Stop your cluster and issue the below command & then start your cluster again.

    sudo rm -rf  /usr/local/hadoop_tmp/hdfs/datanode/*
    
    0 讨论(0)
  • 2020-12-04 09:15

    Stop all the services - ./stop-all.sh Format all the hdfs tmp directory from all the master and slave. Don't forget to format from slave.

    Format the namenode.(hadoop namenode -format)

    Now start the services on namenode. ./bin/start-all.sh

    This made a difference for me to start the datanode service.

    0 讨论(0)
提交回复
热议问题