ls时,结果是“ls:call from java.net.unknownhostexception:ubuntu:ubuntu:unknown error to”localhost:9000...."

h7wcgrx3  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(386)
ls: Call From java.net.UnknownHostException: ubuntu: ubuntu: unknown error to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

我的hadoop配置是这样的。
/etc/主机

127.0.0.1   localhost

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

core-site.xml文件

<property>  
<name>hadoop.tmp.dir</name>
<value>/Public/hadoop-2.7.1/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>

hdfs-site.xml文件

<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permission</name>
<value>false</value>
</property>

mapred-site.xml文件

<property>
<name>mapred.job.tracker</name>
<value>hdfs://localhost:9001</value>
</property>

有什么问题吗?我已经上网一整天了…帮帮我

a14dhokn

a14dhokn1#

试试这个:
1打开 /etc/hosts 在终端中使用命令:

sudo nano /etc/hosts

2在下面添加此行 127.0.0.1 生产线:

your-ip-address    hadoopmaster

注意:要查找ip地址,请键入以下命令 ifconfig | grep inet 在终点站。
三。改变 localhosthadoopmastercore-site.xml 以及 mapred-site.xml 4停止所有hadoop进程,然后重新开始。

相关问题