s-u / REngine

General Java interface to R supporting multiple back-ends such as JRI and Rserve
Other
67 stars 47 forks source link

Can't connect to R in java using RConnection #20

Closed ghost closed 3 years ago

ghost commented 6 years ago

String myScript = "R CMD Rserve --RS-port "+port+";Desktop/./R_Start.sh"; String[] cmdArray = {"xterm", "-e", myScript + " ; le_exec"}; r.exec(cmdArray).waitFor();

After creating connection with Rserve im trying to connect with R using my IP address RConnection rconn=new RConnection("localhost",1234) is working but using like this RConnection rconn=new RConnection("192.168.18.63",1234) showing error Connection refused

s-u commented 3 years ago

By default Rserve will not bind to external addresses (for security reasons). To use it remotely, you have to enable remote connections, e.g. via --RS-enable-remote or configuration (see docs).