How to connect R remote(KNIME) and R server under Windows environment

Hello,

I have a question about how to connect between KNIME and R server.

I am sure that the IP address and port number is correct,but KNIME R snippet(Remote) seems didn’t work.

Under the Windows environment , I key in

library(Rserve)
Rserve()

at R GUI ,

but KNIME cannot link to R server.

On the forum, someone says that I have to edit the configuration file,

but I didn’t see the file called Rserv.cfg.

Can someone help me , please.

Thanks

Hi superanaxo, Rserv.cfg is in the working directory and has to be created if it doesn’t exist. More details on how to setup the remote connection can be found in thisthread. Best, Thomas

Hi Gabriel,

I want to connect to a remote linux machine where Rstudio is installed from a windows machine where KNIME is installed. My objective is to create a node in KNIME to run R codes remotely on the linux machine and then just get the results back. I don't want the R code to be be visible in Windows machine. I have installed Rserve in both the machines. Also Installed is R-scripting extension for filing in the details of the remote machine. I have given the IP address and port number of the remote machine. The port number corresponds to where Rstudio is installed. Location of R in computer is \usr\lib\R\bin\exec\ in R-scripting. I have attached the image (1). image(2) which is also attached gives path to R home in KNIME R Preferences (C:\Users\rajendra.m\Desktop\knime_2.11.0_with_cascade_1.0.1\plugins\org.knime.ext.r3.bin.win32.x86_3.0.3.0044664\R-Inst). When I add >library(Rserve)
>Rserve() in R snippet node of KNIME. It creates a task in localhost. How do we trigger R process in remote machine? Is my procedure correct?

Hi Rajendra,

if you want to use the Scripting Integration nodes and Rserve, then follow the URL in the help of the node descrition:

https://github.com/knime-mpicbg/knime-scripting/wiki/R-server-for-knime

(I agree, this documentation needs some update/clarification... it is on our to do list...)

In brief:

on your windows machine:

- install KNIME, Scripting Integration nodes and R/R-Rstudio

- install and start Rserve (in R:  install.packages("Rserve"); library(Rserve); Rserve(args='--vanilla');)

- make sure that Rserve.exe is running in the task manager

- first, try your local Rserver: Preferences -> R-Scripting -> The host... type in "localhost". The port is 6311.

- drag and drop R snippet from Scripting Integration, connect to some input data and execute (sends data to Rserver and gets it back) -> green node? great! you have installed a local Rserver!

- second, install R and Rserve and start Rserve on your linux machine (see above)

- set host in preferences now to the IP address of your linux machine and try to execute the snippet again

- you might need to follow the instructions on the website mentioned above to get it running!?

Good luck!

Martin 

ps: I attached a screen shot of my preferences...

 

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.