Hadoop集群搭建【web端不显示从节点问题】

系统:CentOS7

环境:jdk8

版本:hadoop-2.7.7

结构

hadoop01 namedata、nodedata
hadoop02 nodedata
hadoop03 nodedata

配置  hadoop-2.7.7/etc/hadoop/hadoop-env.sh

export JAVA_HOME=/opt/app/jdk1.8.0_221  //这里是我的jdk安装目录

  配置 hadoop-2.7.7/etc/hadoop/core-site.xml




  
      fs.defaultFS			
      hdfs://hadoop01:9000
      true
  

  
      hadoop.tmp.dir
      /home/kjctar/tmp  
  

  
      io.file.buffer.size
      4096
  
 

配置hadoop-2.7.7/etc/hadoop/hdfs-site.xml



	
	  dfs.namenode.name.dir
	  /home/hadoopdata/dfs/name
	
	
	  dfs.datanode.data.dir
	  /home/hadoopdata/dfs/data
	

	
	  dfs.replication
	  3
	

	
	  dfs.blocksize
	  134217728
	
        
          fs.checkpoint.dir
          /home/hadoopdata/checkpoint/dfs/cname
        

	
	  dfs.http.address
	  hadoop01:50070
	

         
          dfs.secondary.http.address
          hadoop01:50090
        

	
	   dfs.webhdfs.enabled 
	   false      
	
        
 dfs.namenode.datanode.registration.ip-hostname-check
 false
        


 配置 hadoop-2.7.7/etc/hadoop/mypred-site.xml


	
	  mapreduce.framework.name
	  yarn
	

	
	  mapreduce.jobhistory.address
	  hadoop01:10020
	

	
	  mapreduce.jobhistory.webapp.address
	  hadoop01:19888
	  MapReduce JobHistory Server Web UI host:port
	

配置hadoop-2.7.7/etc/hadoop/yarn-site.xml


	
		yarn.nodemanager.aux-services
		hadoop01
	
	 
	
		yarn.nodemanager.aux-services
		mapreduce_shuffle
	

	
		yarn.resourcemanager.hostname
		hadoop01
	 

	
		yarn.resourcemanager.address
		hadoop01:8032
	

	
		yarn.resourcemanager.scheduler.address
		hadoop01:8030
	

	
		yarn.resourcemanager.resource-tracker.address
		hadoop01:8031
	
	  
	 
		yarn.resourcemanager.admin.address
		hadoop01:8033
	 
	 
	 
		The http address of the RM web application.
		yarn.resourcemanager.webapp.address
		hadoop01:8088
	  




 

然后切换到 hadoop-2.7.7/bin 目录执行如下命令

./hdfs namenode–format 
./hadoop namenode –format

再切换到 hadoop-2.7.7/sbin 启动

./start-dfs.sh 

然后访问主机的50070端口,正常情况下会显示三个nodedata节点

Hadoop集群搭建【web端不显示从节点问题】_第1张图片

   那么如果显示 0个节点 解决方法如下:

方案一https://blog.csdn.net/nengliweb/article/details/41208649
方案二https://blog.csdn.net/qq_25662627/article/details/81143117
方案三 如果显示主节点显示,而从节点不显示,多半是防火墙没有关,吧主节点和从节点的防火墙关闭

systemctl stop firewalld


 

你可能感兴趣的:(大数据,hadoop)