How to change the TEMP working directory for TIBCO Enterprise Runtime for R - Server Edition (TERR Service)

How to change the TEMP working directory for TIBCO Enterprise Runtime for R - Server Edition (TERR Service)

book

Article ID: KB0072353

calendar_today

Updated On:

Products Versions
Spotfire Enterprise Runtime for R - Server Edition All

Description

The system temp folder determined by the application (for example, C:\Windows\TEMP) is used by default as the TEMP working directory for the TERR Service. This article describes how to set a custom TEMP directory.
 

Issue/Introduction

TIBCO Enterprise Runtime for R - Server Edition (TERR Service) uses the system TEMP directory determined by the application as its default TEMP working directory, for example, C:\Windows\TEMP. This article describes how to set a custom TEMP directory.

Environment

All

Resolution

Here are the steps to set a custom TEMP working directory for the TERR Service:

1. Stop the TERR Service.

2. Create a directory of your choosing for the TERR Service to use as a TEMP directory. For example, 'C:\tmp\terrservice'

3. Open the 'startTerr.bat' file with text editor. 
'startTerr.bat' is located in the TERR Service installation directory on your Node Manager.
For example, C:\tibco\tsnm\11.4.0\nm\services\TERR service Windows-1.7.3.3-53ed8717-c741-46cb-9cff-1f3ed195cd9c\
(There may be multiple services starting with TERR_, you will need to check the service ids to figure out which is the TERR service folder being used) and open it for editing.

4. Scroll down to roughly line 53 in 'startTerr.bat' file. You should see the following line:
SET COMMAND="%JAVA_HOME%\bin\java" -Dlog4j.configurationFile=%LOG4J% .... (line continues)

On this line, after "java" but before "-Dlog4j.configurationFile", paste a new property:
-Djava.io.tmpdir=C:/tmp/terrservice
So that the line now looks like this:
SET COMMAND="%JAVA_HOME%\bin\java" -Djava.io.tmpdir=C:/tmp/terrservice -Dlog4j.configurationFile=%LOG4J% .... (line continues)

Save the change.

5. Restart the TERR Service.