Hi,
macOS Sierra, KNIME 3.5.3, R 3.4.4 from homebrew:
I try to execute a simple command in a Table to R node:
library(MSstats)
Of course packages were installed beforehand and the command works in R. Similarly, other basic R commands work in the node.
I get the following error on the Workbench execunting the node with just the line above:
ERROR KNIME-Worker-1 Node Execute failed: R evaluation failed.: "knime.tmp.ret<-NULL;printError<-function(e) print(paste('Error:',conditionMessage(e)));for(exp in tryCatch(parse(text=knime.tmp.script),error=printError)){try(knime.tmp.ret<-eval(exp),silent=True)
if(!is.null(knime.tmp.ret)) {if(knime.tmp.ret$visible) try(print(knime.tmp.ret$value),silent=True)}};rm(knime.tmp.script,exp,printError);knime.tmp.ret$value"
Stacktrace:
DEBUG Table to R 0:16 Execute failed: R evaluation failed.: "knime.tmp.ret<-NULL;printError<-function(e) print(paste('Error:',conditionMessage(e)));for(exp in tryCatch(parse(text=knime.tmp.script),error=printError)){try(knime.tmp.ret<-eval(exp),silent=True)
if(!is.null(knime.tmp.ret)) {if(knime.tmp.ret$visible) try(print(knime.tmp.ret$value),silent=True)}};rm(knime.tmp.script,exp,printError);knime.tmp.ret$value"
org.knime.r.controller.IRController$RException: R evaluation failed.: "knime.tmp.ret<-NULL;printError<-function(e) print(paste('Error:',conditionMessage(e)));for(exp in tryCatch(parse(text=knime.tmp.script),error=printError)){try(knime.tmp.ret<-eval(exp),silent=True)
if(!is.null(knime.tmp.ret)) {if(knime.tmp.ret$visible) try(print(knime.tmp.ret$value),silent=True)}};rm(knime.tmp.script,exp,printError);knime.tmp.ret$value"
at org.knime.r.controller.RController.monitoredEval(RController.java:432)
at org.knime.r.controller.ConsoleLikeRExecutor.executeIgnoreResult(ConsoleLikeRExecutor.java:247)
at org.knime.r.RSnippetNodeModel.runRScript(RSnippetNodeModel.java:256)
at org.knime.r.RSnippetNodeModel.executeSnippet(RSnippetNodeModel.java:206)
at org.knime.r.RSnippetNodeModel.executeSnippet(RSnippetNodeModel.java:170)
at org.knime.r.RSnippetNodeModel.executeInternal(RSnippetNodeModel.java:149)
at org.knime.r.RSnippetNodeModel.execute(RSnippetNodeModel.java:136)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:567)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1172)
at org.knime.core.node.Node.execute(Node.java:959)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:561)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: org.knime.r.controller.IRController$RException: R evaluation failed.: "knime.tmp.ret<-NULL;printError<-function(e) print(paste('Error:',conditionMessage(e)));for(exp in tryCatch(parse(text=knime.tmp.script),error=printError)){try(knime.tmp.ret<-eval(exp),silent=True)
if(!is.null(knime.tmp.ret)) {if(knime.tmp.ret$visible) try(print(knime.tmp.ret$value),silent=True)}};rm(knime.tmp.script,exp,printError);knime.tmp.ret$value"
at org.knime.r.controller.RController.eval(RController.java:421)
at org.knime.r.controller.RController$MonitoredEval.lambda$0(RController.java:1430)
at org.knime.r.controller.RController$MonitoredEval$$Lambda$171/160883583.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadUtils$3.runWithContext(ThreadUtils.java:486)
at org.knime.core.util.ThreadUtils$ThreadWithContext.run(ThreadUtils.java:304)
Caused by: org.rosuda.REngine.Rserve.RserveException: voidEval failed, request status: error code: 127
at org.rosuda.REngine.Rserve.RConnection.voidEval(RConnection.java:182)
at org.knime.r.controller.RController.eval(RController.java:416)
... 5 more
In the configuration dialogue i get additionally:
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:141)
at org.rosuda.REngine.Rserve.protocol.RTalk.request(RTalk.java:205)
at org.rosuda.REngine.Rserve.protocol.RTalk.request(RTalk.java:180)
at org.rosuda.REngine.Rserve.protocol.RTalk.request(RTalk.java:250)
at org.rosuda.REngine.Rserve.RConnection.eval(RConnection.java:231)
at org.knime.r.controller.RController.eval(RController.java:413)
at org.knime.r.controller.RController$MonitoredEval.lambda$0(RController.java:1430)
at org.knime.r.controller.RController$MonitoredEval$$Lambda$169/694497285.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadUtils$3.runWithContext(ThreadUtils.java:486)
at org.knime.core.util.ThreadUtils$ThreadWithContext.run(ThreadUtils.java:304)
Side notes:
Even executing
knime.tmp.ret<-NULL;printError<-function(e) message(paste('Error:',conditionMessage(e)));tryCatch(knime.tmp.ret<-withVisible(eval(library(MSstats))),error=printError);if(!is.null(knime.tmp.ret)) { if(knime.tmp.ret$visible) {tryCatch(print(knime.tmp.ret$value),error=printError)}};rm(printError);knime.tmp.ret$value
works in R directly.
In the configure dialogue, I get additionally:
library('Cairo');options(device='png',bitmapType='cairo')
png("/private/var/folders/3w/sgbzzwr94nz6n61hdw97b7740000gn/T/knime_iPRG_2015_lfq_a57868/rtmp-dialog-57873/rsnippet-plot.png",width=400.0,height=300.0)"ERROR: R evaluation failed.: "library('Cairo');options(device='png',bitmapType='cairo')
png("/private/var/folders/3w/sgbzzwr94nz6n61hdw97b7740000gn/T/knime_iPRG_2015_lfq_a57868/rtmp-dialog-57873/rsnippet-plot.png",width=400.0,height=300.0)"ERROR: eval failed, request status: error code: 127
but loading a standard library like dplyr works.
By the way:
Once a failed script was executed in the configure dialogue, it cannot recover and scripts that work before, do not work in that dialogue anymore.
Any ideas? Or any idea how to debug?