gpt4 book ai didi

hadoop - hadoop连接拒绝更改数据/名称节点时出错

转载 作者:行者123 更新时间:2023-12-02 21:10:11 24 4
gpt4 key购买 nike

我有一个使用VMware工作站的独立hadoop设置。我可以使用以下命令启动hadoop
./start-dfs.sh
./start-yarn.sh

这是hdfs-site.xml

 <property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hduser/mydata/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hduser/mydata/hdfs/datanode</value>
</property>

现在,我已经得到一个单独的dfs目录,我想指向该目录。请注意,此dfs目录包含目录,例如namenode,datanode和secondarydatanode。我正在使用本文作为引用( https://community.hortonworks.com/articles/2308/how-to-move-or-change-the-hdfs-datanode-directorie.html)

但是在将hdfs-site.xml配置到新节点(在路径mynewdatanode中)后,如下所示
 <property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hduser/mynewdata/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hduser/mynewdata/hdfs/datanode</value>
</property>

我使用上面的配置启动了hadoop,但是我看到连接被拒绝的错误
hduser@ubuntu:/usr/local/hadoop/sbin$ hdfs dfs -ls /wordcount/
ls: Call From ubuntu/192.168.52.143 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

有指针吗?非常感激。

最佳答案

格式化namenode可以解决此问题。这是命令
/ bin / hadoop namenode-格式

关于hadoop - hadoop连接拒绝更改数据/名称节点时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40519627/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com