FIX[solved]:Unable to communicate with the runtime for ‘R’ script. Please check the requirements of ‘R’ runtime, Fatal error: cannot create ‘R_TempDir’

I was trying out new R feature in SQL 2016 and encountered this error so I thought I would document this issue.

Resolution steps:

  1. Locate rlauncher config file: (this is used by the MSSQL Launch pad service)
    1. Its normally located in the Binn folder which is available in instance root directory in my case D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn
  2. View the contents of rlauncher and check the working directory which is where we are having issues creating temp dir.
    1. R does not like spaces in the working directory

R launcher 1

 

 

 

 

 

3. Create a folder in C:\ called temp “C:\temp”

4. Change the working directory to c:\temp

 

R launcher 2

 

 

 

 

 
5. Grant permissions for the service MSSQLaunchpad service account in my case its NT Service\MSSQLaunchpad

R launcher 3

 

 

 

 

 

 

 

 

 

 

 

 

Restart the SQL server services and SQL Launch pad services.

 

We can also fix this by using short paths by replacing the working directory with a short path

Eample below cmd will give us the short path for the location

cmd /c for %A in (“D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData”) do @echo %~sA

 

Advertisements

4 thoughts on “FIX[solved]:Unable to communicate with the runtime for ‘R’ script. Please check the requirements of ‘R’ runtime, Fatal error: cannot create ‘R_TempDir’

  1. Sumit Kumar says:

    Hi Akhil,
    I am a member of the SQL Server R Services team at Microsoft. Can you contact me regarding this post?

    Thanks
    Sumit

  2. akhil393 says:

    Hi Hemant,

    What version of SQL Server 2016 are you installing, SQL 2016 CTP3? or SQL 206 SP1? Can try searching rlauncher.config under Program Files, may be it was setup in different location.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s