SQL Server Machine Learning Services 2019 Errors upon fresh install

Julius Johnson 26 Reputation points
2022-06-21T20:17:53.083+00:00

Our organization is having issues installing Machine Learning Services on SQL Server 2019. We have viewed multiple officials and unofficial help resources.

We have manually checked and ensured that the Launchpad has permission to write and read from our SQL Server installation folder and all child directories.

Additionally, we have performed a fresh install of Learning services and rebooted the server running SQL Server 2019 with no success.

We continually receive the following error with no variation.

Query:

EXEC sp_execute_external_script @language =N'R',
@script=N'
OutputDataSet <- InputDataSet;
',
@input_data_1 =N'SELECT 1 AS hello'
WITH RESULT SETS (([hello] int not null));
GO

EXEC sp_execute_external_script @language =N'Python',
@script=N'
OutputDataSet = InputDataSet;
',
@input_data_1 =N'SELECT 1 AS hello'
WITH RESULT SETS (([hello] int not null));
GO

Error Message
Msg 39012, Level 16, State 14, Line 1
Unable to communicate with the runtime for 'R' script for request id: 60EBF56E-B485-4BF1-AEFD-0555277148B1. Please check the requirements of 'R' runtime.
STDERR message(s) from external script:
Error: .onLoad failed in loadNamespace() for 'RevoScaleR', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: fatal error: RevoScaleR cannot be used in this R session anymore, if possible restart R session
error code -1066598274, detailed error message might be found in: (standard output unavailable) and (standard error output unavailable)
Execution halted
exception while shutting down RxClientPipe: cannot write to BxlServer, child process is dead

Msg 39012, Level 16, State 14, Line 8
Unable to communicate with the runtime for 'Python' script for request id: B4617C8E-9FBB-48A1-9B69-AAF554C32822. Please check the requirements of 'Python' runtime.
STDERR message(s) from external script:
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "D:\Microsoft_SQL_Server\MSSQL15.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 657, in rx_sql_satellite_pool_call
rx_sql_session_start(sessionDirectory = sessionDirectory, sessionId = sessionId, waitTime = waitTime)
File "D:\Microsoft_SQL_Server\MSSQL15.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 640, in rx_sql_session_start
rx_native_call("SqlSessionStart", params)
File "D:\Microsoft_SQL_Server\MSSQL15.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 375, in rx_native_call
ret = px_call(functionname, params)
RuntimeError: Write error: expected 8 got 0

STDOUT message(s) from external script:
Options function failed. Please see the console output for more information.
SqlSessionStart function failed. Please see the console output for more information.

Has anyone had any success resolving this issue?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
0 comments No comments
{count} votes

Accepted answer
  1. Seeya Xi-MSFT 16,571 Reputation points
    2022-06-27T08:07:48.247+00:00

    Hi @Julius Johnson ,

    Here is another thread for you: https://stackoverflow.com/questions/63960295/cant-run-r-script-in-ssms-after-fresh-install
    Hope this would give you some help.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Julius Johnson 26 Reputation points
    2022-06-28T15:15:57.06+00:00

    I was able to resolve my errors by updating SQL Server to CU 11.

    1 person found this answer helpful.
    0 comments No comments

  2. Seeya Xi-MSFT 16,571 Reputation points
    2022-06-22T07:43:16.777+00:00

    Hi @Julius Johnson ,

    Welcome to Microsoft Q&A!
    Please right-click on the "D:\Microsoft_SQL_Server\MSSQL15.MSSQLSERVER\PYTHON_SERVICES folder, click Security, then check if the MSSQLLaunchpad service account in the list and check the permission.
    Like this:
    213699-image.png

    Here is a similar thread: https://social.technet.microsoft.com/Forums/en-US/9a743fec-e1f9-40b4-9b06-52e2bee144bb/unable-to-communicate-with-the-runtime-for-python-script-please-check-the-requirements-of?forum=sqlsetupandupgrade
    Also please read this article: https://www.mssqltips.com/sqlservertip/4557/unable-to-communicate-with-the-runtime-for-r-script-in-sql-server/

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Julius Johnson 26 Reputation points
    2022-06-22T13:50:33.897+00:00

    Thanks for the response Seeya, I have read the social.technet.microsoft.com thread before posting this topic and followed all prescribed options. I have had no success at resolving the issued or even seeing a different error message.

    0 comments No comments

  4. Ahamed Thameem 0 Reputation points
    2023-03-05T13:36:50.6933333+00:00

    Hi Julius, I am facing same issue now, I am using SQL 2019 std edition. But I am able to install and run machine learning with python for other server with same edition and version ... Could you please let me know does CU 11 helps. Here I'm am using cluster server....kindly provide some input......

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.