TERR library load error for TERR Service node in Spotfire Server 10.3: 'Error: restricted call to find.package for package data.table'.
book
Article ID: KB0076011
calendar_today
Updated On:
Products
Versions
Spotfire Enterprise Runtime for R - Server Edition
1.1.0 and later
Description
TERR library load error for Web Player in Spotfire Server 10.3 with TERR Service running: 'Error: restricted call to find.package for package data.table'.
Getting this error when Web Player is trying to load the user-contributed "data.table" package from the open-source R community's CRAN repository, when the Spotfire server has TERR Service (TERRSRV) running as TERR engine for TERR data functions.
Could not execute function call. TIBCO Enterprise Runtime for R returned an error: 'Error: restricted call to find.package for package data.table'. at Spotfire.Dxp.Data.DataFunctions.Executors.TerrServiceClient.RunFunction(DataFunctionInvocation invocation) at Spotfire.Dxp.Data.DataFunctions.Executors.SPlusFunctionExecutor.<ExecuteFunction>d__12.MoveNext() at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__3.MoveNext()
Issue/Introduction
TERR library load error for TERR Service node in Spotfire Server 10.3: 'Error: restricted call to find.package for package data.table'.
Environment
All supported environments
Resolution
"TerrServiceClient" in the error message indicates the Web Player sent this data function's TERR script to the TERR Service (TERRSRV) node in the Spotfire Server environment for processing.
The TERR Service (TERRSRV) node sets the property "terr.restricted.execution.mode" to be TRUE by default. With this property set to true, the TERR Service node runs its TERR engines in TERR restricted execution mode (REX). REX mode prevents running TERR commands (such as 'library(data.table)') that load user-contributed R packages which have been installed from the open-source R community's CRAN repository.
The property "terr.restricted.execution.mode" for a live TERR service instance is specified in a property configuration file named "custom.properties", which is typically located at the Node Manager Server application sub-folder "services > TERR service > conf ": e.g. C:\tibco\tsnm\10.3.1\nm\services\TERR service Windows-1.2.0.38-9b96d2c7-116d-4004-ba91-602ad479b50e\conf
# Use TERR restricted execution mode, TRUE or FALSE terr.restricted.execution.mode: FALSE
To configure the "terr.restricted.execution.mode" property for the TERR Service node, please follow the instructions documented in the Configuring the TERR service section of the TERR Service Installation and Administration manual, that is, first exporting the TERR service properties, editing the exported property file with Notepad to have property "terr.restricted.execution.mode: FALSE", importing the edited service property file (giving a new configuration name), and last applying the new configuration through "Nodes & Services" under the administration console for Spotfire Server. TERR service will restart to read the new configuration.