1
votes

I'm having trouble getting R to work on SQL Server 2017 on one server (I've successfully installed it on about 8 other servers). I've already installed that latest cumulative update.

When I execute a stored procedure that runs a simple hello world R script, I can see that LaunchPad.exe and rterm.exe are both running. After 60 seconds, however, I get the following error:

Msg 39012, Level 16, State 1, Line 0
Unable to communicate with the runtime for 'R' script. Please check the requirements of 'R' runtime.
STDERR message(s) from external script: Fatal error: creation of tmpfile failed -- set TMPDIR suitably?

This is the script that fails:

EXEC sp_execute_external_script 
@language =N'R', @script=N'print("hello")';

Any ideas on what I need to do to resolve this error?

2

2 Answers

1
votes

The problem was that Named Pipes wasn't enabled for SQL Server. Enabling that, and restarting the services solved my issue.

0
votes

My assumption is that you applied the CU after the installation of Machine Learning Services? If so, the CU somehow messes up the folder permissions.

I wrote a blog post about how to fix it here. The blog post is about CU7, but it should apply to any CU.

I do not guarantee that it works, as I have seen other issues when the ML Services stop working, for those cases what fixes it is to do a repair of the SQL installation.