WeBWorK Main Forum

Rserve & New, Consistent Error

Rserve & New, Consistent Error

by Wesley Burr -
Number of replies: 2
Upgraded to 2.13 with a fresh install on a previously setup server (backed up and wiped the
/opt/webwork/ directory, then installed fresh). Running CentOS7, and have had (and
continue to have) a service for Rserve listening on 6311. Verified that the usual things were
set.

Now, whenever I try to do anything via rserve_eval() in a question, I get the same error
message, regardless of how simple. The following is an example:

ERROR caught by Translator while processing problem file:set2018-Assignment4/beta_prob_simple.pg **************** ERRORS from evaluating PG file: Unrecognized response type: at line 129 of [PG]/macros/RserveClient.pl Died within Carp::croak called at line 342 of /usr/local/share/perl5/Statistics/R/IO/Rserve.pm from within Statistics::R::IO::Rserve::_send_command called at line 234 of /usr/local/share/perl5/Statistics/R/IO/Rserve.pm from within Statistics::R::IO::Rserve::eval called at line 129 of [PG]/macros/RserveClient.pl from within main::rserve_start called at line 53 of (eval 5712)


Any thoughts on what might be going on? As far as I can tell, the CPAN R::IO bridge is still

installed and working fine, root still has the fix to .bashrc to force CPAN modules to install
for everyone, not just itself, the Rserve process is running fine and listening on 6311, and I
enabled the root => "localhost" setting in localOverrides.

Line 129 of RserveClient.pl is the end of the rserve_start{} block, so I assume it's
happening in initialization, which is why I'm seeing it on every Rserve-related problem,
regardless of how simplistic. But I'm at a loss as to why WW can't talk to the Rserve
process, when it's listening and available (and used to work, albeit on my 2.12-r
installation, not the new 2.13 one).

Note on process: (seems to be listening ok)

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
In reply to Wesley Burr

Re: Rserve & New, Consistent Error

by Danny Glin -
Sorry I've been meaning to add this to the wiki. I ran in to the same thing when I upgraded R to 3.5.0. It looks like R 3.5.0 breaks compatibility with the CRAN version of Rserve. See https://github.com/s-u/Rserve/issues/102

The fix for me was to install the latest version of Rserve according to the suggestion on that page. From within R run
install.packages('Rserve',,"http://rforge.net/",type="source")

I had to install the yum package openssl-devel in order for Rserve to compile from source.
In reply to Wesley Burr

Re: Rserve & New, Consistent Error

by Andras Balogh -
We might have the same problem after a recent perl update on an old 2.13 installation under redhat.
But it is inconsistent and restarting the Rserve seems to help.
Would love to see myself how to fix it.