0

关于我的开发环境的一些信息:

开放堆栈:朱诺

Hadoop:2.4.1

pywebhdfs:0.4.0

我通过 openstack sahara 客户端 API 创建了一个 hadoop 集群,然后我想使用pywebhdfs创建一个文件到 HDFS (用于在创建的 hadoop 集群上启动作业)。但是在创建HDFS文件的时候出现错误,错误信息是:

HTTPConnectionPool(host='vanillacluster-vanillacluster-slave-vanilla-002.novalocal', port=50075): Max retries exceeded with url: /webhdfs/v1/user/hadoop/test/pg20417.txt?op=CREATE&user.name=hadoop&namenoderpcaddress=vanillacluster-vanillacluster-master-vanilla-001:9000&overwrite=false (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f2455bd5750>: Failed to establish a new connection: [Errno -2] Name or service not known',))

我检查了 /etc/hosts,列出了所有节点的 ip 和主机名。有谁知道如何检测可能的问题?谢谢

4

1 回答 1

1

我通过修改文件 /etc/hosts 并映射每个节点的 IP 和主机名解决了这个问题,如下所示:

xxxx vanillacluster-vanillacluster-slave-vanilla-002

xxxx vanillacluster-vanillacluster-master-vanilla-001

于 2016-03-14T15:47:17.930 回答