问题1: 第一次启动集群前需要将master进行hdfs格式化
hdfs namenode -format
注:若以后想要再次格式化需关闭所有namenode、datanode,并删除hadoop目录下data、logs文件夹
问题2: 启动报错“Attempting to operate on hdfs namenode as root”
可在/etc/profile.d中添加一个sh脚本注入环境变量,脚本内容如下
export HDFS_NAMENODE_USER=root
export HDFS_DATANODE_USER=root
export HDFS_SECONDARYNAMENODE_USER=root
export YARN_RESOURCEMANAGER_USER=root
export YARN_NODEMANAGER_USER=root
问题3: jps命令查询后发现datanode、namenode、nodemanager都正常启动了,唯独不见resourcemanager
启动集群时,不应直接调用./start-all.sh,应当在master上调用./start-dfs.sh,在准备部署resourcemanager的服务器上调用./start-yarn.sh
问题4: localhost: mv: 无法获取“XXX”状态信息
要么是xml文件配置存在错误,要么是防火墙存在问题 centos7关闭开启防火墙命令如下:
systemctl stop firewalld.service
systemctl start firewalld.service
systemctl disable firewalld.service
systemctl enable firewalld.service
问题5: secondnamenode可视化查看网页打不开
同上
问题6: 启动nodemanagers时报出警告“localhost: Warning: Permanently added ‘localhost’ (ECDSA) to the list of known hosts.”
删除hadoop/etc/hadoop/workers文件中的localhost一行即可
|