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
芯-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>
有什么问题吗?我已经在网上浏览了一整天..帮助我
答案 0 :(得分:0)
试试这个:
1。使用以下命令在终端中打开/etc/hosts
:
sudo nano /etc/hosts
2。在127.0.0.1
行下方添加以下行:
your-ip-address hadoopmaster
注意:要查找您的IP地址,请键入此命令
ifconfig | grep inet
在终端。
3。在localhost
和hadoopmaster
core-site.xml
更改为mapred-site.xml
4. 停止所有hadoop进程,然后重新开始。