0

I run Hadoop cluster (master + 3 slaves)+Hive server and I want to use RHive over it. I installed R environment on every computer. Rserve was installed on every node and RHive was installed on the master. I get error trying to run RHive on master:

> 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 listens on TCP port 6311 on slave1, slave2 and slave3. I tested it with:

nc -z hadoop-slave1 6311
Connection to hadoop-slave1  6311 port [tcp/*] succeeded!

What could be connection problem?

sunny
  • 1,887
  • 3
  • 29
  • 40

1 Answers1

0

RHive calls for Rserve url 'hadoop-slave1:6311' as listed in {hadoop home}/conf/slaves

I opened R and testd connction to this url:

% R 

> library("Rserve") 

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

then connection failed.

I tried to connect by IP and it succeed!

The problem was DNS configurations!!!

There are 2 possible solutions: 1. fix DNS server, then connecting by name will work 2. open {hadoop home}/conf/slaves and fix slave names to IP's

sunny
  • 1,887
  • 3
  • 29
  • 40