简体   繁体   中英

Cannot load data.table package in MRS remote session

When I try to load data.table package in a remote session on a MS R Server, I get an error:

REMOTE> library(data.table)
Error: package or namespace load failed for 'data.table'

Using the namespace directly I get more colour:

REMOTE> data.table::data.table(x = 1)
Error: .onLoad failed in loadNamespace() for 'data.table', details:
  call: assign("cbind.data.frame", tt, envir = asNamespace("base"), inherits = FALSE)
  error: cannot change value of locked binding for 'cbind.data.frame'

Any advice on how to resolve this?

Here some more information about the way R server is set up and how I install packages:

  1. R server runs on a separate machine (call it A) from the one where I start the remote session. The machine A is configured as one-box ie the web-node and compute-node both run on that machine.
  2. I am running the R client on my local machine (call it B) via Microsoft Visual Studio Professional 2015 Version 14.0.25431.01 Update 3, Microsoft .NET Framework Version 4.6.01038 with R Tools for Visual Studio, 1.0.30228.1316 RC2.
  3. I installed data.table package directly on the machine A by running 'Rgui' console with this command: install.packages('data.table'). The library installs into lib C:\\RglobalPkgs specified by R_LIBS system environment variable on the machine A.
  4. I create a remote session on the machine B running these commands:

    library(mrsdeploy) remoteLogin("http://machineA:12800", username = "admin", password = "xyz", session = TRUE, commandline = TRUE)

  5. In the remote session I try to load the data.table package as described above at the beginning of my question which fails. Running .libPath() in the remote session gives:

    REMOTE> .libPaths() [1] "C:/RglobalPkgs" [2] "C:/Program Files/Microsoft/R Server/R_SERVER/library"

I emailed the dev team about this. Response below:

We're aware of the issue and will push a fix in the next release. A workaround is to go to C:\\Program Files\\Microsoft\\R Server\\R_SERVER\\deployr\\RServe\\RScripts\\source.R on the machine with the compute node and comment out

 # unlockBinding("unlockBinding",b) # assign("unlockBinding", deployr.unlock, envir=b) # lockBinding("unlockBinding", b) 

Then go to services and restart the RServe9.0.0 service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM