向hadoop导入文件,报错

....

There are 0 datanode(s) running and no node(s) are excluded in this operation.

....

查看配置 

$hadoop_home/hadoop/etc/hdfs-site.xml

<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/sparkuser/myspark/hadoop/hdfs/name</value>
</property>
<property> 

解决

删除目录下的 hdfs目录下所有文件

1. 查看NameNode的9000端口,(core-site.xml文件中的fs.default.name节点配置)端口是否打开,因为所有的DataNode都要通过这个端口连接NameNode

2. 关闭防火墙,因为防火墙可能会阻止其他的电脑连接。使用以下命令关闭防火墙

**查看防火墙**

service iptables status

service iptable stop

chkconfig iptable  off

3.在host文件中注释掉

127.0.0.1 localhost 
::1 localhost6 Master

相关文章:

  • 2022-12-23
  • 2021-07-30
  • 2021-09-04
  • 2022-01-29
  • 2022-12-23
  • 2021-12-07
  • 2021-05-27
  • 2022-12-23
猜你喜欢
  • 2022-01-03
  • 2021-10-04
  • 2021-09-21
  • 2021-08-11
  • 2021-05-28
  • 2022-01-12
  • 2022-12-23
相关资源
相似解决方案