0
votes

I have 3 servers Centos 7 (firewall and selinux disabled) chadoop1 (master), chadoop2 (slave) and chadoop3 (slave)

When i start service, nodes no up, i see on jps, don´t show DataNode and NodeManager.

All config are rsync on nodes (except slaves)

I try reformat, show OK, but same problem.

my dir is: /opt/hadoop

Configs:

hdfs-site.xml

<configuration>
    <property>
            <name>dfs.data.dir</name>
            <value>/opt/hadoop/dfs/name/data</value>
            <final>true</final>
    </property>
    <property>
            <name>dfs.name.dir</name>
            <value>/opt/hadoop/dfs/name</value>
            <final>true</final>
    </property>
    <property>
            <name>dfs.replication</name>
            <value>2</value>
    </property>

core-site.xml

<configuration>

<property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:8020/</value>
    <description>NameNode URI</description>
</property>

<property>
  <name>io.file.buffer.size</name>
  <value>131072</value>
  <description>Buffer size</description>
</property>

mapred-site.xml

<configuration>

<property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
    <description>MapReduce framework name</description>
</property>

<property>
  <name>mapreduce.jobhistory.address</name>
  <value>localhost:10020</value>
  <description>Default port is 10020.</description>
</property>

<property>
  <name>mapreduce.jobhistory.webapp.address</name>
  <value>localhost:19888</value>
  <description>Default port is 19888.</description>
</property>

<property>
  <name>mapreduce.jobhistory.intermediate-done-dir</name>
  <value>/mr-history/tmp</value>
  <description>Directory where history files are written by MapReduce jobs.</description>
</property>

<property>
  <name>mapreduce.jobhistory.done-dir</name>
  <value>/mr-history/done</value>
  <description>Directory where history files are managed by the MR JobHistory Server.</description>
</property>

yarn-site.xml

<configuration>

<property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
    <description>MapReduce framework name</description>
</property>

<property>
  <name>mapreduce.jobhistory.address</name>
  <value>localhost:10020</value>
  <description>Default port is 10020.</description>
</property>

<property>
  <name>mapreduce.jobhistory.webapp.address</name>
  <value>localhost:19888</value>
  <description>Default port is 19888.</description>
</property>

<property>
  <name>mapreduce.jobhistory.intermediate-done-dir</name>
  <value>/mr-history/tmp</value>
  <description>Directory where history files are written by MapReduce jobs.</description>
</property>

<property>
  <name>mapreduce.jobhistory.done-dir</name>
  <value>/mr-history/done</value>
  <description>Directory where history files are managed by the MR JobHistory Server.</description>
</property>

slaves (on master only, in slave have localhost)

chadoop3
chadoop4

Start Service

[hadoop@chadoop1 hadoop]$ start-dfs.sh
 Starting namenodes on [localhost]
 localhost: starting namenode, logging to /opt/hadoop/logs/hadoop-hadoop- 
 namenode-chadoop1.out
 chadoop4: starting datanode, logging to /opt/hadoop/logs/hadoop-hadoop- 
 datanode-chadoop4.out
 chadoop3: starting datanode, logging to /opt/hadoop/logs/hadoop-hadoop-                    
 datanode-chadoop3.out
 Starting secondary namenodes [0.0.0.0]
 0.0.0.0: starting secondarynamenode, logging to /opt/hadoop/logs/hadoop- 
 hadoop-secondarynamenode-chadoop1.out

 [hadoop@chadoop1 hadoop]$ jps
 5603 Jps
 5492 SecondaryNameNode
 5291 NameNode
 [hadoop@chadoop1 hadoop]$ start-yarn.sh
 starting yarn daemons
 starting resourcemanager, logging to /opt/hadoop/logs/yarn-hadoop-               
 resourcemanager-chadoop1.out
 chadoop3: starting nodemanager, logging to /opt/hadoop/logs/yarn-hadoop- 
 nodemanager-chadoop3.out
 chadoop4: starting nodemanager, logging to /opt/hadoop/logs/yarn-hadoop- 
 nodemanager-chadoop4.out
 [hadoop@chadoop1 hadoop]$ jps
 5492 SecondaryNameNode
 5658 ResourceManager
 5914 Jps
 5291 NameNode
1
Please add /opt/hadoop/logs/hadoop-hadoop-datanode-*.out files to the question. Note: Never use localhost in the XML. Always use the external host or IP names - OneCricketeer
Thanks for localhost information. hadoop-hadoop-datanode-chadoop1.log (end file) 2018-10-18 09:03:35,211 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Got finalize command for block pool BP-1848867256-127.0.0.1-153978980$ 2018-10-18 11:14:03,411 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: RECEIVED SIGNAL 15: SIGTERM 2018-10-18 11:14:03,787 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG: SHUTDOWN_MSG: Shutting down DataNode at localhost/127.0.0.1 - user1149440
RECEIVED SIGNAL 15: SIGTERM means it got shutdown from some external process, not necessarily any error. You could look at the other 2 machines logs for errors - OneCricketeer

1 Answers

1
votes

All config are rsync on nodes (except slaves)

All configs must be on all nodes.

That being said, the datanodes need to know where on the network that the NameNode exists, so the process cannot be on localhost if the server is actually supposed to be a slave. Therefore, you must put the actual hostname.

Same for YARN services.

i see on jps, don´t show DataNode and NodeManager.

From the output shown, you seem to have only started services on the master machine, not the two slaves where those services would exist.

The start scripts only control one machine, not the cluster, and jps will only show the local machine's Java processes


By the way, Apache Ambari makes it much easier to install and manage a Hadoop cluster.