I was trying out new R feature in SQL 2016 and encountered this error so I thought I would document this issue.
- Locate rlauncher config file: (this is used by the MSSQL Launch pad service)
- 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
- View the contents of rlauncher and check the working directory which is where we are having issues creating temp dir.
- R does not like spaces in the working directory
3. Create a folder in C:\ called temp “C:\temp”
4. Change the working directory to c:\temp
5. Grant permissions for the service MSSQLaunchpad service account in my case its NT Service\MSSQLaunchpad
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
7 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’”
I am a member of the SQL Server R Services team at Microsoft. Can you contact me regarding this post?
Hi Sumit, yes sure you can contact me at email@example.com
i am having same error. but there is no rlauncher.config file in C:\Program Files\Microsoft SQL Server 2016\MSSQL13.SQL2016\MSSQL\Binn
not sure why? can you please help..
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.
If you just modify the config file to include ” ”
i.e. WORKING_DIRECTORY=”g:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData”
it will work as well
I did this to all paths
HEMANT SRIVASTAVA, ExtensibilityData was located at:
D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData
I installed sql server 2016 on a clean D:\ drive My version of Microsoft SQL Server Management Studio is 13.0.16106.4.