Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
talendstar
Creator
Creator

Error with tSystem

I am running a batch file that runs a R script.

 

The step runs fine when I am running it in the studio - however when the job is run from the TIC it errors out:

 

C:\TalendRemoteEngine\TalendJobServersFiles\repository\AVBTALEND71_TermFee_Master_5cd1b33a1488ad43b1448fd0_2.3\TermFee_Master>"C:\Program Files\R\R-3.4.4\bin\Rscript" "C:\TermFee\VacancyEstimation\VacancyEstimation.R"
Error in library(npsurv) : there is no package called 'npsurv'
Execution halted

 

When I load R on the RE server - I am able to load the library npsurv just fine and do not get an error.

 

What could be happening here?

 

Labels (1)
1 Solution

Accepted Solutions
talendstar
Creator
Creator
Author

So looks like when I installed required R library from R console, it installed it in my user directory on windows.

 

By running .libpath in R console I was able to see where the library are being stored:

> .libPaths()
[1] "C:/Users/myuser/Documents/R/win-library/3.4"
[2] "C:/Program Files/R/R-3.4.4/library"

 

either you need install the library in the path [2] so when you run the Talend tsystem component from TIC, R execution can see the libraries or add a line to top to your R script:

.libPaths(c("C:/Users/myuser/Documents/R/win-library/3.4", .libPaths()))

 

This should fix the problem.

View solution in original post

3 Replies
fdenis
Master
Master

check your execution server, it it on windows or linux, and your dev is on windows or linux?
tSystem call local exec so you have to valid that your exec is present and you can run it with Talend execution user
talendstar
Creator
Creator
Author

Both the Talend Studio server and the remote engine servers are windows 2012.

 

The Talend Service is running under Local System on the remote engine.

 

When I log on the remote engine server - I can bring up the command prompt and execute the batch successfully.

 

Can you please elaborate on how to validate that the exec is present? by the way I have another tsystem in the same job that executes a python script but that step runs fine.

 

Thanks

talendstar
Creator
Creator
Author

So looks like when I installed required R library from R console, it installed it in my user directory on windows.

 

By running .libpath in R console I was able to see where the library are being stored:

> .libPaths()
[1] "C:/Users/myuser/Documents/R/win-library/3.4"
[2] "C:/Program Files/R/R-3.4.4/library"

 

either you need install the library in the path [2] so when you run the Talend tsystem component from TIC, R execution can see the libraries or add a line to top to your R script:

.libPaths(c("C:/Users/myuser/Documents/R/win-library/3.4", .libPaths()))

 

This should fix the problem.