gpt4 book ai didi

r - 在rhive.env()上出现错误:无法连接到x.x.x.x上的Rserver

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

我运行Hadoop集群(主服务器+ 3个从服务器)+ Hive服务器,我想在其上使用RHive。
我在每台计算机上都安装了R环境。
Rserve安装在每个节点上,RHive安装在主节点上。
尝试在master上运行RHive时出现错误:

> rhive.env()
Hive Home Directory : {Hive home directory}
Hadoop Home Directory : {Hadoop home directory}
Hadoop Conf Directory : {HAdoop configuration directory}
Default RServe List
x.x.x.8 hadoop-slave1 x.x.x.9 hadoop-slave2 x.x.x.10 hadoop-slave3
warning: cant't connect to a Rserver at x.x.x.8 hadoop-slave1:6311
warning: cant't connect to a Rserver at x.x.x.9 hadoop-slave2:6311
warning: cant't connect to a Rserver at x.x.x.10 hadoop-slave3:6311
Disconnected HiveServer and HDFS
Warning messages:
1: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
x.x.x.8 hadoop-slave1:6311 cannot be opened
2: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
x.x.x.9 hadoop-slave2:6311 cannot be opened
3: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
x.x.x.10 hadoop-slave3:6311 cannot be opened

Rserve侦听slave1,slave2和slave3上的TCP端口6311。
我用以下方法进行了测试:
nc -z hadoop-slave1 6311
Connection to hadoop-slave1 6311 port [tcp/*] succeeded!

什么是连接问题?

最佳答案

RHive要求{hadoop home} / conf / slaves中列出的Rserve url'hadoop-slave1:6311'

我打开R并测试了该URL的连接:

% R 

> library("Rserve")

> c <- RSconnect(host = " hadoop-slave1", port = 6311)

然后连接失败。

我尝试通过IP连接,但成功!

问题是DNS配置!!!

有两种可能的解决方案:
1.修复DNS服务器,然后按名称连接即可
2.打开{hadoop home} / conf / slaves并将从属名称固定为IP

关于r - 在rhive.env()上出现错误:无法连接到x.x.x.x上的Rserver,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16634672/

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