Solutions to problems encountered in the daily life of a bioinformatician.
Apr 20, 2012
Let FastRWeb communicate via TCP/IP instead of unix sockets
Unix sockets are efficient and nice and everything, but if you want to use your Rserve installation in the most flexible way (e.g. connect through KNIME or Windows in general) you'll probably prefer a TCP/IP connection. It is easy enough to set Rserve up to use TCP/IP, but before you can start with FastRWeb you need to convince the CGI client to use the right protocol. In order to do this just find the folder where R has put FastRWeb (in R just type: system.file("cgi-bin", package="FastRWeb") ) and then find the source files for the client in a subfolder called Rcgi. There is a file Rcgi.cc you need to edit. Read the comments where Simon Urbanek explains how to set RSERVE_HOST and RSERVE_PORT, compile with the make command, copy the new client Rcgi to your CGI-BIN folder and you're good to go!
Subscribe to:
Post Comments (Atom)
Thanks a lot. This was very helpful to know Rcgi.cc can be edited and re-compiled. I was installing in a location different from /var/FastRWeb and kept getting the error
ReplyDeleteUnable to connect (result=-1, socket:unknown socket error 2)
After editing PROJECT_ROOT and RSERVE_SOCK in Rcgi.cc to match my setup, then re-compiling with the make command, and copying new client Rcgi to my CGI-BIN folder everything works fine.
e.g. http://my.server/cgi-bin/Rcgi/main
produces Hello, World!
Danke schoen,
Jagat