KNOWLEDGE BASE

Configuring Tableau Server for R and Rserve


Published: 14 Jul 2014
Last Modified Date: 21 Jan 2019

Question

How to configure Tableau Server for use with R and Rserve.

Environment

Tableau Server 

Answer

Step 1: Install and Configure R and Rserve

Install R and run the Rserve service. For more information on installing and configuring R, see R Implementation Notes.

To support running both SSL-enabled and plaintext connections to an Rserve instance, the Rserve Server administrator must add the following entry to the Rserve configuration file on the Rserve Server:  plaintext enable

Note: It is not recommended to install any other server applications or databases, including R, on the computers running Tableau Server. When R is not installed on the computer running Tableau Server, it must be configured for a remote connection.

Step 2: Configure Tableau Server

Tableau Server 10.1 and Newer Versions: 

  1. Stop Tableau Server.
  2. Open the Command Prompt as an administrator and change to the Tableau Server bin directory. For example:
    • cd "C:\Program Files\Tableau\Tableau Server\10.5\bin"
  3. Enter the following commands to set the host address and port values:
    • tabadmin set vizqlserver.extsvc.host <ip address of Rserve>
    • tabadmin set vizqlserver.extsvc.port <port of Rserve>
    • tabadmin set vizqlserver.extsvc.username <Rserve username>
    • tabadmin set vizqlserver.extsvc.password <Rserve password>
  4. Enter the following command to register the changes:
    • tabadmin config
  5. Start Tableau Server.

Tableau Server 10.0 and Older Versions:

  1. Stop Tableau Server.
  2. Open the Command Prompt as an administrator and change to the Tableau Server bin directory. For example:
    • 32-bit: cd "C:\Program Files (x86)\Tableau\Tableau Server\9.1\bin"
    • 64-bit: cd "C:\Program Files\Tableau\Tableau Server\9.1\bin"
  3. Enter the following commands to set the host address and port values:
    • tabadmin set vizqlserver.rserve.host <ip address of Rserve>
    • tabadmin set vizqlserver.rserve.port <port of Rserve>
    • tabadmin set vizqlserver.rserve.username <Rserve username>
    • tabadmin set vizqlserver.rserve.password <Rserve password>
  4. Enter the following command to register the changes:
    • tabadmin config
  5. Start Tableau Server.

Tableau Server 10.2 and Newer Versions: 

  1. Open TSM command line/shell.
  2. Enter the following commands to set the host address and port values: 

    o  tsm configuration set -k vizqlserver.extsvc.host -v <ip address of Rserve>

    o  tsm configuration set -k vizqlserver.extsvc.port -v <port of Rserve>

    o  tsm configuration set -k vizqlserver.extsvc.username -v <Rserve username>

    o  tsm configuration set -k vizqlserver.extsvc.password -v <Rserve password>

  3. Enter the following command to apply the changes and restart:

          o tsm pending-changes apply

Did this article resolve the issue?