gpt4 book ai didi

macos - UnknownHostException-在Mac OSX Mavericks上格式化HDFS

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

我正在尝试在运行OSX 10.9的MacBook Pro上以伪分布式模式运行Hadoop 2.3。我看到以下错误:

14/04/09 15:05:43 WARN net.DNS: Unable to determine address of the host-falling back to "localhost" address
java.net.UnknownHostException: crowlem8: crowlem8
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at org.apache.hadoop.net.DNS.resolveLocalHostIPAddress(DNS.java:287)
at org.apache.hadoop.net.DNS.<clinit>(DNS.java:58)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.newBlockPoolID(NNStorage.java:914)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.newNamespaceInfo(NNStorage.java:550)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:144)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:829)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1218)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1325)
Caused by: java.net.UnknownHostException: crowlem8
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)

关于如何解决这个问题有什么想法吗?我在CentOS上格式化HDFS时看到了关于UnknownHostExceptions的 related question。不确定如何根据该答案进行操作。

最佳答案

原来的解决方案是将以下内容添加到/ etc / hosts中:
127.0.0.1 localhost.localdomain本地主机

在上述情况下是crowlem8

关于macos - UnknownHostException-在Mac OSX Mavericks上格式化HDFS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22975125/

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