我运行 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!
什么可能是连接问题?