当前位置:   article > 正文

启动集群报错

启动集群报错

问题

启动HDFS时有报错, hadoop102上没有NameNode进程

[k@hadoop102 hadoop-3.3.6]$ sbin/start-dfs.sh 
Starting namenodes on [hadoop102]
Starting datanodes
localhost: mv: 无法获取'/opt/module/hadoop-3.3.6/logs/hadoop-k-datanode-hadoop102.out' 的文件状态(stat): 没有那个文件或目录
Starting secondary namenodes [hadoop104]
[k@hadoop102 hadoop-3.3.6]$ jps
15929 Jps
11711 DataNode
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

解决

[k@hadoop102 hadoop-3.3.6]$ vim etc/hadoop/workers 
localhost #删除改行可解决报错提示
hadoop102
hadoop103
hadoop104
  • 1
  • 2
  • 3
  • 4
  • 5

重新格式化NameNode

  1. 停掉所有进程
  2. 删除每台机器hadoop-3.1.3下的data和logs
  3. 在NameNode配置机器上格式化
  4. 重新启动集群
[k@hadoop102 hadoop-3.3.6]$ rm -rf data/ logs/
[k@hadoop102 hadoop-3.3.6]$ hdfs namenode -format
[k@hadoop102 hadoop-3.3.6]$ sbin/start-dfs.sh 
Starting namenodes on [hadoop102]
Starting datanodes
hadoop103: WARNING: /opt/module/hadoop-3.3.6/logs does not exist. Creating.
hadoop104: WARNING: /opt/module/hadoop-3.3.6/logs does not exist. Creating.
Starting secondary namenodes [hadoop104]
[k@hadoop102 hadoop-3.3.6]$ jps
2914 NameNode  #有了√
3094 DataNode
3388 Jps
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/659266
推荐阅读
相关标签
  

闽ICP备14008679号