3

Currently trying to connect to an Amazon AWS server via IP address on port 6311. I've set up Rserve as a daemon on the AWS server and have checked that it is in fact listening on port 6311 by calling the netstat command, but when I run the follow from my local R client:

c <- RS.connect(host = "x.x.x.x")

I get this error message:

-  cannot connect to x.x.x.x:6311

The local client does have RSClient installed, we've verified that Rserve is installed and running correctly on the host server.

Does anyone have any suggestions on how to connect to a remote server using this method??

jangorecki
  • 16,384
  • 4
  • 79
  • 160
  • Can you confirm that you added an appropriate rule to allow inbound access to 6311 in your AWS security groups? (eg http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html ) – jthetzel Oct 27 '14 at 17:36
  • If you have nmap installed on a client, what does `nmap -p 6311 x.x.x.x` return? – jthetzel Oct 27 '14 at 17:42
  • I can confirm that I've added an inbound TCP connection on 6311 to my security group in amazon. Nmap states that 6311 is currently open – Chris Freeman Oct 27 '14 at 18:06
  • Could you add the output of `R CMD Rserve --RS-settings` from the server? – jthetzel Oct 27 '14 at 18:26
  • Here's the response: config file: /etc/Rserv.conf working root: /tmp/Rserv port: 6311 local socket: [none, TCP/IP used] authorization required: no plain text password: not allowed passwords file: [none] allow I/O: yes allow remote access: yes control commands: no interactive: yes max.input buffer size: 262144 kB – Chris Freeman Oct 27 '14 at 18:31
  • I can connect to an Rserve server from a client using RSclient and the same settings you use. Does `telnet x.x.x.x 6311` from the client return `Rsrv0103QAP1`? – jthetzel Oct 27 '14 at 19:20

1 Answers1

3

You need to set the entire public dns address as your host.

(e.g.)

c <- RS.connect(host = "ec2-X-X-X-X.{availability_zone}.compute.amazonaws.com")
jangorecki
  • 16,384
  • 4
  • 79
  • 160